ServiceProvider

Returns a service with the class name requested. When called with the name of a service (such as Debris) it will return the instance of that service. If the service does not yet exist it will be created and the new service is returned. This is the only way to create some services, and can also be used for services that have unusual names, e.g. RunService’s name is “Run Service”.

Code Samples

ServiceProvider:GetService

local UserInputService = Universe:GetService("UserInputService")

Parameters

NameTypeDefaultDescription

className

string

The class name of the requested service

Returns

Return TypeSummary

Instance

An instance of the requested service

Last updated