I am trying to make a group locked Auto Team Assigner.
I have tried this but it did not work. Why is it not working?
I have auto assignable off, and the neutral off, and the Team and the Spawn Colors match.
function onPlayerEntered(plr)
if plr:IsInGroup(4907341) then
plr.TeamColor = BrickColor.new("Baby blue")
plr:LoadCharacter()
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)
If that does not work, check that IsInGroup if statement is working by adding a print
What this would look like:
function onPlayerEntered(plr)
print(plr)
if plr:IsInGroup(4907341) then
print(4907341)
plr.Team = game:GetService([[Teams]])[NameOfTeam]--Team path
plr:LoadCharacter()
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)
Good question, why isn’t it working? There’s no issues with the script itself. I threw this in Roblox Studio (or rather created a lazy version of it) and it worked as expected.