I was looking into Person299's Admin Commands when I found this line of code, here is the line;
player = game.Players:playerFromCharacter(object)
I've never seen game.Players:playerFromCharacter()
, but I have seen game.Players:GetPlayerFromCharacter
, I know they work the same, but is it a valid kind of code?(Tags added as are because this code is from an even bigger script.)
Yes, it is a real method but it is deprecated. That means you shouldn't use it in new things because its subject to bugs or removal.
There are other examples of things like this; for example, :children()
is a deprecated alias of :GetChildren()
.