AdPortal
A portal that teleports players to a sponsored experience as part of immersive ads.
| Memory category | Instances |
|---|
Member index 3
Removed member index 4
| History | Member | |
|---|---|---|
| 577 | PortalStatus: AdPortalStatus | |
| 688 | TeleportConfirmed(placeId: int64, player: Player): null | |
| 688 | TeleportRejected(shouldCooldown: bool, rejectedByDistance: bool): null |
Description
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).
History 24
- 688 Remove TeleportRejected
- 688 Remove TeleportConfirmed
- 587 Remove
- 583 Add TeleportRejected
- 583 Add TeleportConfirmed
- 577 Remove PortalStatus
- 569 Change Default of Status from Active to Inactive
- 568 Add Status
- 568 Change Tags of PortalStatus from [ReadOnly, NotReplicated] to [ReadOnly, NotReplicated, Deprecated]
- 567 Change Tags of from [] to [Hidden, NotScriptable, Deprecated]
- 553 Change Default of from to 1
- 553 Change Default of from to Forward
- 553 Change Default of PortalStatus from to Invalid
- 551 Change Tags of AdPortal from [NotBrowsable] to []
- 547 Change Tags of PortalStatus from [ReadOnly, NotReplicated, NotScriptable] to [ReadOnly, NotReplicated]
- 547 Change Tags of AdPortal from [NotCreatable, NotBrowsable] to [NotBrowsable]
- 545 Add
- 544 Change ValueType of from PortalType to AdPortalType
- 544 Add PortalStatus
- 543 Add
- 543 Add PortalInvalidReason
- 543 Change Tags of AdPortal from [NotCreatable] to [NotCreatable, NotBrowsable]
- 543 Change Superclass of AdPortal from BasePart to Instance
- 541 Add AdPortal
Members 3
PortalInvalidReason
| Type | Default | |
|---|---|---|
| string | ||
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.
| Thread safety | ReadSafe |
|---|---|
| Category | State |
| Loaded/Saved | false |
History 1
Status
| Type | Default | |
|---|---|---|
| AdUnitStatus | Inactive | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | false |
Removed members 4
PortalStatus
| Type | Default | |
|---|---|---|
| AdPortalStatus | Invalid | |
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | false |
History 5
- 577 Remove PortalStatus
- 568 Change Tags of PortalStatus from [ReadOnly, NotReplicated] to [ReadOnly, NotReplicated, Deprecated]
- 553 Change Default of PortalStatus from to Invalid
- 547 Change Tags of PortalStatus from [ReadOnly, NotReplicated, NotScriptable] to [ReadOnly, NotReplicated]
- 544 Add PortalStatus
TeleportConfirmed
| Parameters (2) | ||
|---|---|---|
| placeId | int64 | |
| player | Player | |
| Returns (1) | ||
| null | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 2
- 688 Remove TeleportConfirmed
- 583 Add TeleportConfirmed
TeleportRejected
| Parameters (2) | ||
|---|---|---|
| shouldCooldown | bool | |
| rejectedByDistance | bool | |
| Returns (1) | ||
| null | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 2
- 688 Remove TeleportRejected
- 583 Add TeleportRejected