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

Is there an advantage for using GetService?

Is there any advantage to either game:GetService("Players") or game.Players?

2 comments

1

if you rename the Players service, you can still use game:GetService("Players"), but not game.Players

0

nice, did not know that

1 answer

✓ Accepted answer

There is a difference. First of all game.Players runs exactly the same as game:GetService("Players") But..

Lets say that someone has a trash PC, if your using game.Players then there is a possibility that the service has not loaded in yet thus will result in an error destroying your whole script.

But game:GetService("Players") if the service has not loaded in yet then the script will add the service to your game so no matter how trash the players PC is, it will always load in properly with no errors. I hope this helped and solved your problem.

Happy Coding, Destroyer1234x

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