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

Why does my nametag script apply to everyone?

Asked by 2 years ago
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!

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 theking66hayday 841 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago
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
Ad

Answer this question