So it's suppose to create a billboardgui above the players head when they click a text button, however it's not showing up. I get no errors and it's in a local script.
local SGui = Instance.new("ScreenGui", script.Parent)
local Clickme = Instance.new("TextButton", SGui)
Clickme.Size = UDim2.new(0,100,0,50)
Clickme.Position = UDim2.new(0,300,0,50)
Clickme.Text = "Click Me"
player= game.Players.LocalPlayer
char = player.Character
head = char:WaitForChild("Head")
Clickme.MouseButton1Down:connect(function()
local Frame = Instance.new("Frame", SGui)
Frame.Size = UDim2.new(1,500,0.5,100)
Frame.Position = UDim2.new(0,490,0,100)
local CD = Instance.new("TextLabel", Frame)
CD.Size = UDim2.new(0,100,0,50)
CD.Position = UDim2.new(0,20,0,10)
CD.Text = "Common Diseases"
local UD = Instance.new("TextLabel", Frame)
UD.Size = UDim2.new(0,100,0,50)
UD.Position = UDim2.new(0,150,0,10)
UD.Text = "Uncommon Diseases"
local RD = Instance.new("TextLabel", Frame)
RD.Size = UDim2.new(0,100,0,50)
RD.Position = UDim2.new(0,270,0,10)
RD.Text = "Rare Diseases"
local URD = Instance.new("TextLabel", Frame)
URD.Size = UDim2.new(0,100,0,50)
URD.Position = UDim2.new(0,390,0,10)
URD.Text = "Ultra Rare Diseases"
----------------------------------------------------------- Labels ^
local Stress = Instance.new("TextButton", Frame)
Stress.Size = UDim2.new(0,70,0,50)
Stress.Position = UDim2.new(0,20,0.1,30)
Stress.Text = "Stress"
Stress.MouseButton1Down:connect(function()
local gui = Instance.new("BillboardGui",char) <----this area of the script
gui.Adornee = head
gui.Size = UDim2.new(0,100,0,50)
local frame1 = Instance.new("Frame", gui)
local stress1 = Instance.new("TextLabel", frame1)
stress1.Text = "Stress"
SGui:Destroy()
end)
-------------------------------------------------------------
local GallStones = Instance.new("TextButton", Frame)
GallStones.Size = UDim2.new(0,70,0,50)
GallStones.Position = UDim2.new(0,20,0.23,30)
GallStones.Text = "GallStones"
GallStones.MouseButton1Down:connect(function()
SGui:Destroy()
end)
-------------------------------------------------------------
local Appendicitis = Instance.new("TextButton", Frame)
end)
