Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Check if specific player left without using PlayerRemoving?

Asked by
z_lm 9
3 years ago

Hello, I was wondering if theres a way to see if a player has left or not without using PlayerRemoving. If I use a playerremoving script in the middle of my loop, it wont let me break it, so instead I think an easier way would be to check if the player is still in the game. I have the Player as a local already, I have their Player, Humanoid, Character, etc. When the loop continues, can I just check it like I did below the post? It doesn't work but what am I doing wrong?

local player = --already have the path, just an example
while wait() do
print("Sick!")
wait(3)
if player == nil then
break
end


0
I figured it out, I just checked if they were on the team they're supposed to be on. Hope this helps anyone else z_lm 9 — 3y

Answer this question