Get all Roblox services

Is there a way to get all services in roblox?

I tried this:

 for _, service in ipairs(game:GetChildren()) do
        if service:IsA("Instance") then print(service.Name)  
       end 
 end

it prints the first few services fine but then gives me this error

image

Yeah, that happens because you accessed a Roblox-locked service, like CoreGui. You could run this in a pcall.

Also all services are going to be Instances, checking this is redundant

5 Likes

some of game:GetChildren() could be RBX signals or boolean though

Actually no, since they aren’t children. Only instances can be children of instances.

1 Like
for _, service in ipairs(game:GetChildren()) do 
pcall(function() 
print(service) 
end) 
end

This will print all the services. I’m not entirely sure if all of them are services, but at least you’ll get all the services you have security permission to access.

What are you using this for? Some sort of custom array to easier access the services instead of doing game:GetService() all the time?

2 Likes