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

How do I make a script that displays certain user's names, and renames them, as a billboard GUI?

Asked by 10 years ago

I have no idea on how to do this; tried many times but failed. I want to be able to display which users are DEV's in my game. Please help. Like a GUI that hovers above their head.

2 answers

Log in to vote
2
Answered by 10 years ago
Developers = {} --Put their name
game.Players.PlayerAdded:connect(function(ps)
    wait(0.25)
    for k,v in pairs(Developers) do
        if ps.Name == v then
            print("Developer is here!")
            while wait() do --wait for their character
                if ps.Character then
                    break
                end
            end
            g = Instance.new("BillboardGui",ps.Character.Head) --remember if they die the gui will go away
            g.Name = "pc"
            g.StudsOffset=Vector3.new(0,2,0)
            g.Size=UDim2.new(3,0,2,0)
            text=Instance.new("TextLabel",g)
            text.Name = "Chat"
            text.Size=UDim2.new(2.25,0,0.79)
            text.TextScaled = true
            text.Visible = false
            text.Position=UDim2.new(-0.125,0,-0.25,0)
            text.TextColor3 = Color3.new(1,1,1)
            text.TextScaled = true
            text.BackgroundTransparency = 1
            text.FontSize = "Size48"
            text.Text = ps.Name
        end
    end
end)
0
Thank you, this is exactly what I was looking for, but Could it be tweaked to stay to their head even on death? MUSHR0OM 0 — 10y
0
You can do a while loop or game:GetService("RunService") SilenceCore 25 — 10y
0
Where would I insert that? MUSHR0OM 0 — 10y
0
And, this renames them as, Developer, right? MUSHR0OM 0 — 10y
0
And, can I put more than one name in the brackets? MUSHR0OM 0 — 10y
Ad
Log in to vote
2
Answered by
OniiCh_n 410 Moderation Voter
10 years ago

Basically, you're going to want to insert a billboard GUI into the Player's head, then set the text to the Player's name.

Idk if this will work; it's untested. This is really just an example, and it only works when the player first joins the game. I forgot how to do it every time the player respawns.

game.Players.PlayerAdded:connect(function(plr)
     gui = Instance.new("BillboardGUI")
     gui.Parent = plr
     gui.Text = plr.Name
end
0
Thank you for helping. But it's not exactly what I was looking for. Thanks anyways! :D MUSHR0OM 0 — 10y

Answer this question