GetService or FindService?

I was messing around with DataModel and i stumbled across FindService, it appears to do the exact same thing as GetService with only one difference, if the Service isn’t found, it will error, but with GetService, it creates a Service if it doesnt exist, so:

game:GetService() or game:FindService()?

FindService
GetService

game:GetService("Workspace") -- Creates new if Service not found

game:FindService("Workspace") -- Errors if Service not found

Your question has already been answered here:

2 Likes

Woops, I forgot that I made this topic, I was going to say that I found this but I was focused on other things, thanks tho

I think that :FindService() Might be depreciated, but hasn’t been labeled as so officially yet.

GetService will create a service that doesn’t exist. FindService will not.

1 Like