Wait until a players team has changed?

I know that there is a better way of doing this…

repeat wait() until player.TeamColor == BrickColor.new("Red")
player:GetPropertyChangedSignal("TeamColor"):Wait()

if you would like to know the new color

player:GetPropertyChangedSignal("TeamColor"):Connect(function()
    if player.TeamColor.Name == "Red" then
        -- your stuff
    end
end)

you’re welcome

1 Like