Setting a player's team occasionally defaults back to the starting team

Issue Type: Other
Impact: High
Frequency: Sometimes
Date First Experienced: 2021-02-28 01:02:00 (-05:00)
Date Last Experienced: 2021-03-19 03:03:00 (-04:00)

Rough Reproduction Steps:

  1. Have at least three teams in your game - one team should have AutoAssignable set to true, the others should have AutoAssignable to false
  2. Change a player’s team to an non-AutoAssignable team using a script - it appears as though using game:GetService(“Teams”):WaitForChild(“TeamName”) or setting the player’s TeamColor directly is the cause of this
    image
  3. Observe that the player’s team is rarely set back to the AutoAssignable team - not the team you intended

I do not have an exact repro. This bug is really inconsistent and is driving me crazy. If there’s anything I can do to help test, please let me know.

It’s a possibility that this could be an issue with my code, but I have checked literally every line related to changing a player’s team and none of the code should set it back to the starting team.

Here is my current ideation process in trying to figure out of this bug is due to me or is a Roblox engine bug.

My process has led me to believe this may be an engine bug. I have used numerous print statements, tracking, log dumps - and the key factor appears to be setting the team using :WaitForChild() or setting the team using TeamColor.

Expected Behavior:
The player is joins the team you scripted them to join - they do not default back to the AutoAssignable team.

Actual Behavior:
The player rarely is set to the AutoAssignable team for seemingly no reason.

Workaround:
None.

7 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

1 Like

I’m having the same issue. For me, this occurs whenever a player resets/dies. The second the player dies someone other than the dead player will have their team changed back to the autoassignable team.

1 Like

Years later, still no follow up on that ticket lol…


It’s been a year since the last post but I’m still having this issue. I have 0 scripts that change players’ teams yet for some reason, my team switches back to the starting team after a set amount of time has passed since I begin playtesting in Studio.

Still having the issue, hoping for a fix soon. In my game, I can replicate the glitch almost 100% of the time by walking over my second checkpoint in a specific way.

You should supply repro steps and/or a video to help Roblox reproduce this issue.

It would be a video very similar to what MatauPlays already uploaded, would it be of any use?

If you add steps as to what you’re doing to make it occur nearly 100% of the time, would say yes.

Uninspired Obby_STRIPPED.rbxl (82.8 KB)
Here is a stripped down version of my game, with very few assets remaining, which I am still able to replicate the glitch in.

Here is a video of me triggering the glitch:

If you do exactly what I do in the video, run straight over the spawnpoint without stopping, then you can replicate the glitch ~100% of the time.

2 Likes

“we’ll follow up when we have an update for you.” :broken_heart: :sob:

Can someone check in on this? Games with teams act super weird and sometimes the server list just breaks and doesn’t show everyone.

This happens 100% of the time in my game, when the player touches an Unanchored Part.

Change teams > Touch Unanchored Part > Reverts to original team immediately > Change teams again > Never reverts.

Also based on what I’ve seen all these instances highlighted here follow that logic, as soon as you are touching something Unanchored it reverts, I even checked the house, and it is Unanchored, I anchored the whole house, and it did not happen.

Changing the team via Server script also replicates the glitch, the only solution I’ve found is killing the player once you change their team, which isn’t always a good fix and is also just a pain.

After a lot of testing, there is no way to fix it other than doing something truly silly, so enjoy this silly fix that does in fact (from my testing) fix it 100% of the time.

This code is in a ServerScript within ServerScriptService.

local AutoAssignTeam = game.Teams["Off Work"]

game.Players.PlayerAdded:Connect(function(Player)
	-- Set Team initially
	Player.Team = AutoAssignTeam
	
	-- Spawn a part to trigger the Team reset bug
	Player.CharacterAdded:Connect(function(Character)
		local TempPart = Instance.new("Part")
		TempPart.Position = Character.PrimaryPart.Position
		TempPart.Parent = workspace
		task.wait(0.1)
		TempPart:Destroy()
	end)
	
	-- Set Team once more
	Player.Team = AutoAssignTeam
end)
2 Likes

it is may 2026 and this still happens dude :frowning: