I am having trouble when making a script with billboard guis?
I am trying to make a script that spawns a billboardgui with an asset on me and then it grows and shrinks. Here is my code.
01 | local BillBoardGUI = game.ReplicatedStorage.Assets.BillboardGui |
03 | script.Parent.Touched:connect( function () |
05 | local newBillBoardGUI = BillBoardGUI:Clone() |
06 | newBillBoardGUI.Name = "BillboardGui" |
07 | newBillBoardGUI.Parent = game.Workspace |
08 | newBillBoardGUI:MakeJoints() |
09 | newBillBoardGui:MoveTo(Players.DF_Zhang.Head.Position) |
11 | local ImageLabel = game.ReplicatedStorage.Assets.ImageLabel |
13 | script.Parent.Touched:connect( function () |
14 | local newImageLabel - ImageLabel:Clone() |
15 | newImageLabel.Name = "ImageLabel" |
16 | newImageLabel.Parent = game.Workspace.BillboardGui |
19 | script.Parent.BillboardGui.Size = script.Parent.BillboardGui.Size + UDim 2. new(. 01 , 0 ,. 01 , 0 ) |
20 | script.Parent.BillboardGui.StudsOffset = script.Parent.BillboardGui.StudsOffset + Vector 3. new( 0 ,. 005 , 0 ) |