GetService (Method)
From Legacy Roblox Wiki
(Redirected from GetService (Function))
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
- BadgeService
- CoreGui
- StarterGui
- ChangeHistoryService
- Chat
- CollectionService
- ContentFilter
- ContentProvider
- ControllerService
- Debris
- FlagStandService
- FriendService
- Geometry
- GuiService
- GuidRegistryService
- InsertService
- Lighting
- LocalBackpack
- MeshContentProvider
- NetworkClient
- NetworkServer
- Workspace
- PhysicsService
- Players
- RunService
- ScriptContext
- ScriptInformationProvider
- Selection
- SocialService
- SoundService
- SpawnerService
- Stats
- StarterPack
- Teams
- TeleportService
- TextService
- Timer
- VirtualUser
- Visit
- RenderHooksService
In GlobalSettings:GetService
- Authoring
- ChangeHistoryService
- Chat
- CollectionService
- ControllerService
- Debris
- DebugSettings
- FlagStandService
- FriendService
- GameSettings
- Geometry
- GuidRegistryService
- InsertService
- Lighting
- LuaSettings
- NetworkClient (Creating this in GlobalSettings will crash your game)
- NetworkServer (Creating this in GlobalSettings will crash your game)
- NetworkSettings
- PhysicsSettings
- RenderSettings
- RunService
- ScriptContext
- Selection
- SoundService
- SpawnerService
- Stats
- StarterPack
- Teams
- TaskScheduler
- Timer
- VirtualUser
- Visit
- RenderHooksService
In UserSettings:GetService
- ChangeHistoryService
- Chat
- CollectionService
- ControllerService
- Debris
- FlagStandService
- FriendService
- Geometry
- GuidRegistryService
- InsertService
- Lighting
- NetworkClient (Creating this in UserSettings will crash your game)
- NetworkServer (Creating this in UserSettings will crash your game)
- RunService
- ScriptContext
- Selection
- SoundService
- SpawnerService
- Stats
- StarterPack
- Teams
- Timer
- UserGameSettings
- VirtualUser
- Visit
- RenderHooksService