I have this code:
game.Players.PlayerRemoving:Connect(function(player)
print(player.Team)
end)
Output: Nil
Sorry for my bad english
I have this code:
game.Players.PlayerRemoving:Connect(function(player)
print(player.Team)
end)
Output: Nil
Sorry for my bad english
are you sure they had a team set?
yes, im sure
char 30 i dont know
you could try saving what team each player was in before leaving in a table
Have you checked any instances inside the player during runtime?
It’s a good option, however I would like to know what is happening even if I have to solve it in another way.
What do you mean “instances”?
ddd





Of course, it would be nil because the player is being removed and would no longer exist. Maybe you can fix it by storing the player’s team in a variable.it might work.
I thought Roblox left the player’s instance for a few seconds to get their information and save it
So the player leaves the team without waiting after pressing the stop button?
hey! did you ever find out how to fix this? i have the same problem as well.
game.Players.PlayerRemoving:Connect(function(player)
local team = player.Team
print(team)
end)
I solved it by adding an Attribute to the player with the team name when assigning it, and when the player leaves, what I do is
game.Players.PlayerRemoving:Connect(function(player)
local team = player:GetAttribute("Team")
end)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.