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

How do you make an overhead gui correctly?

Asked by 4 years ago
Edited 4 years ago

Hi, I've recently tried an attempt to make an overhead GUI which did nit go down well cause it has no errors and it's not working properly.

01local billboardgui = game:GetService("ServerStorage"):WaitForChild("Billboardgui")
02 
03game.Players.PlayerAdded:Connect(function(player)
04 
05    player.CharacterAdded:Connect(function(character)
06 if player.Name == "charlesec" then
07local clonedgui = billboardgui:Clone()
08clonedgui.TextLabel.Text = "Owner"
09clonedgui.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 0)
10clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
11 
12     end
13 
14 
15end)
0
What is the problem exactly? What doesn't work? bostaffmanbulgaria1 89 — 4y
0
It won't put the gui over my avatars head. charlesec 36 — 4y
0
AlvinBlox made a great tutorial on this. Here's the video: https://www.youtube.com/watch?v=-MsFqGCtn2k kingblaze_1000 359 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

I hope this is what you've been looking for!

01local function NewOverheadGui(title, player)
02    local BillboardGui = Instance.new("BillboardGui")
03    local TextLabel = Instance.new("TextLabel")
04 
05    BillboardGui.Parent = workspace:WaitForChild(player.Name).Head
06    BillboardGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
07    BillboardGui.Active = true
08    BillboardGui.AlwaysOnTop = true
09    BillboardGui.ExtentsOffsetWorldSpace = Vector3.new(0, 5, 0)
10    BillboardGui.LightInfluence = 1.000
11    BillboardGui.Size = UDim2.new(0, 200, 0, 50)
12 
13    TextLabel.Parent = BillboardGui
14    TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
15    TextLabel.BackgroundTransparency = 1.000
View all 31 lines...
Ad

Answer this question