recently saw a question containing something like this.
from what i've tested, they return the same thing?
recently saw a question containing something like this.
from what i've tested, they return the same thing?
The GetChildren() function is inherited by all instances, this includes objects such as Players, ReplicatedStorage, Lighting etc. And most objects you wouldn't normally think of as instances.
GetPlayers() on the other hand is only inherited by the Players object. I believe they've kept this function for backwards-compatability.
maybe read this, it might help.
https://developer.roblox.com/en-us/api-reference/function/Players/GetPlayers
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
maybe read this, it might help.
https://developer.roblox.com/en-us/api-reference/function/Players/GetPlayers
'GetPlayers' is a more appropriate method. That and the method will strictly filter Player Instances.
Nice