Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer
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)

5 comments

0

Thank you, this is exactly what I was looking for, but Could it be tweaked to stay to their head even on death?

0

You can do a while loop or game:GetService("RunService")

0

Where would I insert that?

0

And, this renames them as, Developer, right?

0

And, can I put more than one name in the brackets?

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

1 comment

0

Thank you for helping. But it's not exactly what I was looking for. Thanks anyways! :D

This discussion is preserved as it was. New answers, comments, and votes are closed.