g = script.Parent -- g is actually the folder in which the script is and g is in ServerStorage
plr = g.Parent.Parent
wait(.5)
if plr:IsInGroup(1085813) then --Group ID
plr.TeamColor = BrickColor.new("White")
else
plr.TeamColor = BrickColor.new("Pearl")
end
✓ ANSWER ACCEPTED
Why it don't make the player change team?
1 answer
✓ Accepted answer
ServerStorage's do not run scripts. If you want to however make it change teams upon join, here is the proper coding.
Script Location: ServerScriptService
game.Players.PlayerAdded:connect(function(plr)
if plr:IsInGroup(1085813) then
plr.TeamColor = BrickColor.new("White")
else
plr.TeamColor = BrickColor.new("Pearl")
end
end)
I hope that helped. :)
1 comment
0
That helped! Thanks :D
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Only Local Scripts can use LocalPlayer.
I've already realized it, but thanks.