When are API services in scripts necessary?

I am making a game currently, and some game:GetService elements are not seeming to function some scripts. I know that API services come in handy a lot when it comes to local and module scripts. This is very hard and a real struggle for me and I know that some “pro” scripters can help me with this, when are API services necessary?

Could you go into depth here and provide some code?

API services are need all the time when you are coding your game, make sure it’s enabled.

game:GetService(“ReplicatedStorage”)
ReplicatedStorage.Folder.Part.Parent = workspace

That is some of my code, I was asking what API services are necessary in some pieces of code.

I started using :GetService because I found it more consistent and a more appropriate way to fetch the services.

I found that there are many benefits to using :GetService in comparison to just referencing the services by dot. (Well not really many)

  • Names of services can be changed, :GetService still returns the service regardless
  • Not all services are guaranteed to exist, e.g Teams, Players. Some services are only created or used when needed.

Is that what you mean?