GBX.lua.BillboardGui (Object): Difference between revisions
m (→Properties) |
mNo edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{CatUp|Class reference}} | {{CatUp|Class reference}} | ||
{{Hidden}} | |||
A '''BillboardGui''' is a GUI object that can 'stick to' [[GBX.lua.Part (Object)|part]] objects in what appears to be 3D space. It always faces the camera, and appears to get smaller as the camera gets farther away from it. Unlike the text that appears above models with Humanoids' heads, this does not disappear or resize. Also, unlike BubbleChat, this object does not give big text to its descendants. | A '''BillboardGui''' is a GUI object that can 'stick to' [[GBX.lua.Part (Object)|part]] objects in what appears to be 3D space. It always faces the camera, and appears to get smaller as the camera gets farther away from it. Unlike the text that appears above models with Humanoids' heads, this does not disappear or resize. Also, unlike BubbleChat, this object does not give big text to its descendants. | ||
Line 55: | Line 55: | ||
[[Category: GoodBlox Lua Objects]] | [[Category: GoodBlox Lua Objects]] | ||
[[Category: Hidden Objects]] |
Latest revision as of 20:01, 23 September 2021
Hidden: This item is not shown in Object Browser. It is likely broken. Expect problems and changes.
A BillboardGui is a GUI object that can 'stick to' part objects in what appears to be 3D space. It always faces the camera, and appears to get smaller as the camera gets farther away from it. Unlike the text that appears above models with Humanoids' heads, this does not disappear or resize. Also, unlike BubbleChat, this object does not give big text to its descendants.
Example:
local players = game:GetService("Players") local player = players.LocalPlayer local character = player.Character local bg = Instance.new("BillboardGui") bg.Parent = player.PlayerGui bg.Adornee = character.Head -- Same size as Head bg.Size = UDim2.new( 1.0, 0, 1.0, 0 ) -- Above (defaults to inside) bg.StudsOffset = Vector3.new( 0, 2, 0 ) local frame = Instance.new("Frame") frame.Parent = bg frame.Size = UDim2.new(1.0, 0, 1.0, 0 ) frame.BackgroundTransparency = 0.7 frame.BackgroundColor3 = Color3.new( 1,1,1 ) local text = Instance.new("TextLabel") text.Parent = frame text.Position = UDim2.new( 0.25, 0, 0.25, 0 ) text.Size = UDim2.new(0.5, 0, 0.5, 0 ) text.Text = "Hello"
Known Issues:
When using this object with ImageLabel, it is known to flicker between your face decal, and the texture.
GUI events like MouseButton1Click do not fire for child objects.
Functions
The BillboardGui only incorporates global functions.
Properties
In addition to the global properties, the BillboardGui object also has these:
Events
The BillboardGui only incorporates global events.