githubEdit

ServiceProvider

Returns a service with the class name requested. When called with the name of a service 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.

Code Samples

ServiceProvider:GetService

local UserInputService = game:GetService("UserInputService")

Parameters

Name
Type
Default
Description

className

string

The class name of the requested service

Returns

Return Type
Summary

Instance

An instance of the requested service

Last updated

Was this helpful?