Ad
Log in to vote
0

Why does my nametag script apply to everyone?

Asked by 3 months 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 501 — 3mo

1 answer

Log in to vote
0
Answered by 3 months ago
Edited 25 days 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