Player.Team = nil no longer works

For some reason, the following code prints “team2: Blue”. That didn’t happen before the update and it’s breaking my game.

local Teams = game:GetService("Teams")
wait(1)
local player = game.Players:GetPlayers()[1]
player.Team = Teams["Blue"]
print('team1:', player.Team)
player.Team = nil
print('team2:', player.Team)

Edit: Fixed it by checking if the player is Neutral instead of Team = nil.

2 Likes

Just found this, bad behaviour. It’s weird you can’t explictly set the team to nil, especially since it can be nil naturally or if you set a different teamcolor.

This may not be what you want but could you :Destroy() the Team instance in the Teams service? Or make a neutral team and set the player to that?

huh???

Why would you ever want to remove a team just to make a players team nil …

Idk, I did say you probably wouldn’t want to do that and I don’t know the circumstances. Also, why would you want a players team to be nil? I usually just have a neutral team created when I need it or something.

We are catching up on some historical bugs. We don’t have enough detail to action this. If this bug still persists, please open a new bug and be sure to provide as much detail as possible. Thank you!

1 Like