local player = game.Players.LocalPlayer local Teams = game:GetService("Teams") local RedTeam = Teams:WaitForChild("RedTeam") local YellowTeam = Teams:WaitForChild("YellowTeam") script.Parent.TextButton.MouseButton1Click:Connect(function() print(player.Team) if player.Team == RedTeam then player.Team = YellowTeam end if player.Team == YellowTeam then player.Team = RedTeam end --print(player.Team) end)
Line 8 isn't being read. I start off as YellowTeam, I switch to RedTeam just fine. From RedTeam to YellowTeam it doesn't work. Why?