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

BillboardGUI always on top... How can i do that?

Asked by 6 years ago
Edited 6 years ago

Hi everyone!

I've got a probloem... how can i make BillboardGui Always on top?

I tried but it wasnt on top..

Script:

game.Workspace.ChildAdded:Connect(function(p)
if p.ClassName == "Model" then
wait(0.1)
p.Head = Instance.new("BillboardGui", p.Head)
end
end)
0
Change line 1, connect to Connect. User#19524 175 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

First, you should change the ā€˜cā€™ in connect to an uppercase 'C'.

In line 4, you tried to assign something with the Head, which is incorrect.

-- I will remake your code

game.Workspace.ChildAdded:Connect(function(child)
    plr = game:GetService("Players"):GetPlayerFromCharacter(child)

    if plr then
        local billboardGUI = Instance.new("BillboardGui", plr.Character.Head)
        billboardGUI.AlwaysOnTop = true -- Neat property that always puts it on top
    end
end)
0
Thank you Very much PolskiKrystian9358 9 — 6y
Ad

Answer this question