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

Is this a valid type of code?

Asked by 10 years ago

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

0
Hi!I'm the first to buy your anti-virus plugin! iluvmaths1123 198 — 10y
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. :) TheeDeathCaster 2368 — 10y
0
The plugin works!:) iluvmaths1123 198 — 10y

1 answer

Log in to vote
3
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

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

0
Wow, that explains it, Thanks man! And Happy 4th of July! :) TheeDeathCaster 2368 — 10y
Ad

Answer this question