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

Why does my nametag script apply to everyone?

wait(0.25)
local Character = script.Parent.Parent
local NameTag = script.Parent.Parent.Head:FindFirstChild("NameTag")
if game.Players:GetPlayerFromCharacter(Character).UserId == 1227247890 or 102824475 then	
	NameTag.Frame.Username.Text = Character.Name
	NameTag.Frame.GroupRank.Text = "Owner"
	NameTag.Frame.GroupRank.TextColor3 = Color3.new(243, 150, 0)
	NameTag.Enabled = true
end

I wrote only two user ids, yet it still applies to everyone that joins. It's located in characterscripts btw. Help please!

1 comment

0

You didn't put anything for the other players in that script you might need to do a elseif statement seperating the owner from normal players

1 answer

wait(.25)
local Character = script.Parent
local NameTag = Character.Head:FindFirstChild("NameTag")
if game.Players:GetPlayerFromCharacter(Character).UserId == (1227247890 or 102824475) then    
    NameTag.Frame.Username.Text = Character.Name
    NameTag.Frame.GroupRank.Text = "Owner"
    NameTag.Frame.GroupRank.TextColor3 = Color3.new(243, 150, 0)
    NameTag.Enabled = true
end

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