Class · inherits GuiObject
ViewportFrame
GuiObject that renders 3D objects inside its bounds.
About ViewportFrame
ViewportFrame is a GuiObject that renders 3D objects inside its
bounds, offering a way to display 3D objects in a 2D space like a
ScreenGui. This object has the following caveats:
No shadows or post-processing effects are rendered.
Material.NeonandMaterial.Glassmaterials render at the lowest quality.Nested
GuiObjectsaren't supported.By default, lighting inside a
ViewportFrameacts as ifLighting.EnvironmentSpecularScaleandLighting.EnvironmentDiffuseScaleare both set to0, so properties that rely on these fields, such asSurfaceAppearance.MetalnessMap, may look different.This object can use a
Skychild as a cubemap for reflections, in which case only theSkyobject's sixSkybox[…]properties are used. Assuming these properties are valid, lighting inside theViewportFrameacts similarly to ifLighting.EnvironmentSpecularScaleandLighting.EnvironmentDiffuseScaleare both set to1. For details, see here.
Properties 6
Ambient
: Color3The lighting hue applied to the area within theViewportFrame.This property determines the lighting hue applied to the area within the
ViewportFrame. Defaults toColor3.fromRGB(200, 200, 200)(ghost grey).CurrentCamera
: CameraNotReplicatedCamerathat is used to render children objects.Camerainstance that is used to render children objects. Defaults tonil.The
Cameraobject does not replicate so theViewportFrame.CurrentCamerawon't replicate either. When you set this property,Camera.CFrameandCamera.FieldOfViewwill be saved and replicate with theViewportFrameinternally so the client can render the frame without aCameraobject.ImageColor3
: Color3Determines how the rendered viewport image will be colorized.This property determines how the rendered viewport image will be colorized, allowing you to change the color without directly modifying the rendered object. The default colorization value is
Color3.new(1, 1, 1)(white) at which no color modification occurs.See also
ImageTransparencywhich determines the transparency of the rendered image.ImageTransparency
: floatDetermines the transparency of the rendered viewport image.This property determines the transparency of the rendered viewport image, allowing you to change the transparency without directly modifying the rendered object. A value of
0(default) is completely opaque and a value of1is completely transparent (invisible).See also
ImageColor3which determines how the rendered image will be colorized.LightColor
: Color3The color of the emitted light.The color of the emitted light. Defaults to
Color3.fromRGB(140, 140, 140)(silver).LightDirection
: Vector3AVector3representing the direction of the light source.A
Vector3representing the direction of the light source from position(0, 0, 0). Defaults toVector3.new(-1, -1, -1).
ViewportFrame also has every member of GuiObject. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.