Class
AdPortal
A portal that teleports players to a sponsored experience as part of immersive ads.
An AdPortal is an instance that must be parented to a Part —
attempting to parent it elsewhere throws an error. When added to the data
model, it registers itself with AdService to be served portal ads on
rotation, and it uses a child AdGui to display the current ad's banner
image and destination label above the portal.
When the local player's character touches the parent part, the portal
teleports that player to the sponsored experience associated with the
currently served ad. The portal only teleports while it is valid and has been
served an ad with a destination place (see AdPortal.Status).
Properties 2#
PortalInvalidReasonstring | A creator-facing message explaining why the portal is currently invalid, if it is.ReadSafeReadOnlyNotReplicatedNotScriptable |
StatusAdUnitStatus | Indicates whether the portal is currently active and able to teleport players.ReadSafeReadOnlyNotReplicated |
PortalInvalidReason: string#
ReadOnlyNotReplicatedNotScriptableReadSafe
Holds a human-readable explanation of why the AdPortal is not in a
valid, servable state. When the portal passes validation the value is an
empty string; when validation fails it is populated with the specific
reason reported by the portal's validator, such as an unsuitable parent or
a misconfigured child AdGui.
This property is read-only and defaults to an empty string (""). It is
intended for surfacing configuration problems to creators in Studio.
Status: AdUnitStatus#
ReadOnlyNotReplicatedReadSafe
Reports the portal's current AdUnitStatus. The value is
AdUnitStatus.Active only when the portal has passed validation and
has been served an ad with a valid destination place; in every other case
it is AdUnitStatus.Inactive.
A newly created portal reports AdUnitStatus.Inactive, because its
destination place is unset (0) until the ad service fills the portal
with an ad — the portal cannot become AdUnitStatus.Active, and
therefore cannot teleport, until that happens. This property is read-only.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild