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

game.Players.ChildRemoved and game.Players.PlayerRemoving are the same thing?

Asked by 8 years ago

For example...

game.Players.ChildRemoved:connect(function(plr)

print("Player Removed: " .. plr.Name)

end)

AND

game.Players.PlayerRemoving:connect(function(plr)

print("Player Removed: " .. plr.Name)

end)

Do they both do the same thing? It would make sense if they did the same thing, but it would also make sense if they both didn't do the same thing.

1 answer

Log in to vote
1
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
8 years ago

They will work pretty much the same way in practice. However, ChildRemoved was made for any instance, in any situation, while PlayerRemoving was made specifically for monitoring when someone leaves the game. Therefore I recommend you use PlayerRemoving in this situation.

If we could see Roblox's code, we could better understand how they work differently. But since we can't see it, we might as well trust them and use these events for their intended purposes.

0
Thanks! User#7697 0 — 8y
Ad

Answer this question