I’ve made this script that every time there character loads / resets it will get there team and according to there team it will clone a certain nametag to there head. Yet even if there team is “Alpha County Sheriffs” it stills gives them the citizen tag and prints that there a citizen.
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
--Citizens
game.Workspace:WaitForChild(player.Name)
wait()
local team = game.Players[player.name].Team.Name
print(team)
if team == "Citizens" then
local tag = game.ReplicatedStorage:WaitForChild("TagCitizen"):Clone()
tag.Rescale.name.Text = player.Name
tag.Parent = character.Head
elseif team == "Alpha County Sheriffs" then
local tag = game.ReplicatedStorage:WaitForChild("TagSheriff"):Clone()
tag.Rescale.name.Text = player.Name
tag.Rescale.rank.Text = "[000] "..player:GetRoleInGroup(5025931)
tag.Parent = character.Head
end
end)
end)