Class
AdGui
A surface-based GUI that displays immersive ads on a face of a Part in
the 3D world.
AdGui is a SurfaceGuiBase that renders immersive display ads
onto a face of the Part it's adorned to. When no ad is available, it
shows the creator-supplied AdGui.FallbackImage, or a default Roblox
fallback image when that property is empty.
To render ads, the AdGui must be adorned to a block Part
that's a descendant of Workspace, must be the only surface GUI on that
face, and must be at least the minimum eligible size. When these conditions
aren't met, the object displays a placeholder image in Studio's edit view and
renders nothing in a running experience.
Properties 5#
AdShapeAdShape | Determines the shape of the ad displayed by the AdGui.ReadSafe |
EnableVideoAdsboolean | Enables the AdGui to serve video ads.ReadSafe |
FallbackImageContentId | The image the AdGui displays when no ad is available to serve.ReadSafe |
FallbackImageContentContent | The Content equivalent of AdGui.FallbackImage that
supports asset URIs and EditableImage objects.ReadSafe |
StatusAdUnitStatus | Indicates whether the AdGui is currently displaying a served ad.ReadSafeReadOnlyNotReplicated |
AdShape: AdShape#
ReadSafe
Determines the shape of the ad rendered by the AdGui, including
the creative's aspect ratio on the part surface. Defaults to
HorizontalRectangle, which is the only served shape aside
from the sentinel Undefined.
EnableVideoAds: boolean#
ReadSafe
The property enables the AdGui to serve video ads.
FallbackImage: ContentId#
ReadSafe
FallbackImageContent: Content#
ReadSafe
A Content-typed property that holds the fallback image the
AdGui displays when no served ad is available. It is the
content-typed backing for AdGui.FallbackImage (a legacy
TextureId string); writing to either property updates the same
underlying storage. Unlike FallbackImage, this property accepts
asset URIs and references
to EditableImage objects. When empty, the AdGui renders a
default Roblox fallback image instead.
Status: AdUnitStatus#
ReadOnlyNotReplicatedReadSafe
Callbacks 1#
| OnAdEvent | Used to react to the AdGui events.Deprecated |
OnAdEvent(eventInfo: Dictionary): boolean#
DeprecatedDeprecated
Deprecated. This callback has been deprecated and will never be called.
Used to react to the AdGui events.
| Name | Type | Default | Description |
|---|---|---|---|
eventInfo | Dictionary | Options table for the method:
|
Returns
boolean— Whether the callback has successfully reacted to the event.
Inherited members#
Inherited from SurfaceGuiBase 3
Inherited from GuiBase2d 12
Properties (11)
AbsolutePosition, AbsoluteRotation, AbsoluteSize, AutoLocalize, Localize, RootLocalizationTable, SelectionBehaviorDown, SelectionBehaviorLeft, SelectionBehaviorRight, SelectionBehaviorUp, SelectionGroup
Events (1)
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