whats the difference in
local ReplicatedStorage = game:GetService("ReplicatedStorage")
and
local ReplicatedStorage = game.ReplicatedStorage
whats the difference in
local ReplicatedStorage = game:GetService("ReplicatedStorage")
and
local ReplicatedStorage = game.ReplicatedStorage
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.