Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is this a valid type of code?

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.)

3 comments

0

Hi!I'm the first to buy your anti-virus plugin!

0

Wow, Thanks man! :) It only took me 2-3 hours to test, and make sure the plug-in worked, it was fun making it, and it should work too. :)

0

The plugin works!:)

1 answer

✓ Accepted answer

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().

1 comment

0

Wow, that explains it, Thanks man! And Happy 4th of July! :)

This discussion is preserved as it was. New answers, comments, and votes are closed.