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

What is the difference between game.Players and game:GetService("Players")?

It's just something I wonder everytime I see people's scripts. Why is 'game:GetService("Players") ' more used than just 'game.Players'? Is It safer or something?

1 answer

✓ Accepted answer

Based on this thread from 2016:

:GetService() calls will always return the service, while directly indexing it within game may not. For example, if it hasn't been created yet.

Calling :GetService() is the generally accepted best practice.

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