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

whats the point in doing game:GetService when you could just do game.ReplicatedStorage?

whats the difference in

local ReplicatedStorage = game:GetService("ReplicatedStorage")

and

local ReplicatedStorage = game.ReplicatedStorage

1 answer

✓ Accepted answer

GetService() is mainly used for services that aren't guaranteed to exist, such as Teams and InsertService. Services like Players are guaranteed to exist since all game servers need at least 1 player, so you typically wouldn't have to use :GetService().

I don't see a reason to not use game:GetService() since it can get Services that have their name changed(It's possible to change Service names), and it isn't slower than using game.Players for example

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