I did do a google search but could find nothing on this topic. Probably me being stupid lol. If someone could direct me to the api or give me the roblox function(if there is one). When a player leaves the game I want to destroy the team but have no way of knowing if they are on a team. I know you can do player.Team
but from what I know that could error right(if they don't have a team)? I don't automatically set the player's team at the beginning of the game.
You could do this to safely check if the player is on a team.
if(Player.Team) then print(Player.Team); end
Hope this helps you!
if game.Teams:FindFirstChild(player) then -- stuff end
Hope this helps.. :D