GetService (Method)

From Legacy Roblox Wiki
Jump to navigationJump to search
GetService( string className )
Returns Instance
Description: Returns the service which was requested.
Member of: ServiceProvider

Description

The GetService method returns a service that you ask it for. Send it the name of a service (such as Debris) and it will return a value of the service. Useful for hidden services. If the service you requested is valid, but does not exist, then it will create it and return it.

Example
teams = game:GetService("Teams")


List of obtainable services

Services that are specific to a single object are underlined for your convenience.

In DataModel:GetService

In GlobalSettings:GetService

In UserSettings:GetService