If a script is in the ServerScriptService then whats the best way to access the service?

script.Parent

or

game:GetService("ServerScriptService")
2 Likes

prob depends on the case, if it ends up being script.Parent.Parent.Parent then get the service

2 Likes

Doesn’t really matter (to the extent of my knowledge), but I’d use game:GetService() since if you move the script elsewhere, the script will break.

3 Likes

In my personal opinion

game:GetService("ServerScriptService")

is better because if u were to have a script within another script, it’ll start to look like this:

script.parent.parent.parent

and so on…

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.