Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why Isn't the BillboardGui Showing?

Asked by 9 years ago

Okay so This script creates buttons that when you click it, it should make a billboardGui apear above the players head, however the billboardGui isn't showing up. I get no errors, and this is 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)
0
Is the billboard gui too small that the head itself covers it? Try making your head invisible, can you see the billboard now? If so, you will need to set the billboard studs offset and SizeOffset Nickoakz 231 — 9y
0
Still don't see it. 64batsalex 45 — 9y

Answer this question