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

I don't get how this Variables thing works?

Asked by
Neon_N 104
5 years ago

I can't get the difference between

game.ReplicatedStorage

and

game:Getservice("ReplicatedStorage")

can anyone tell me how it works?

1 answer

Log in to vote
0
Answered by 5 years ago

The GetService method will create services that aren't already loaded, so some services you can't get by name because they don't exist yet.

Most services are already created: BadgeService, MarketplaceService, LogService, and GuiService are a few. A few that aren't already created are the GroupService, PathfindingService, and DataStoreService; there are probably some others but I'm not bothering to check.

Some services also aren't named properly. ScriptContext has the name of "Script Context"; that space makes you have to use game["Script Context"] if you want to get it by name, and you may not remember that each time you want to access it.

0
Thanks! :D Neon_N 104 — 5y
0
Np HeyItzDanniee 252 — 5y
Ad

Answer this question