Service

A service is a top-level singleton, i.e., a class that can only be instantiated once and its instance is always parented to . In Lua, service instances can be retrieved by the GetService method. Like instances, they provide interfaces in the form of members, but usually also act as containers. Services are the highest level of instances visible in the Explorer. A list of services can be found here.
== Visible services==
Some services are always shown in Explorer:
;
:A service that serves as a container for parts which will be rendered. Physics is applied to parts. Each client has its own instance representing the view which is not replicated and can only be manipulated from the client.
;
:A service that serves as a container for instances, each of which represents a client.
;
:A service that serves as an interface for the lighting.
;
:A service that serves as a container for custom materials ( instances).
;
:A service that serves as a container for instances which will be shared with clients. Unlike Workspace, parts are not rendered and physics does not occur.
;
:A service that serves as a container for instances which are replicated to the client first before other instances. Scripts will run here. It is often used for loading screens.
;
:A service that serves as a container for instances which will not be shared with clients.
;
:A service that serves as a container for instances which will not be shared with clients. Scripts will run here.
;
:A service that serves as a container primarily for GUI instances. instances parented to this service are rendered in Roblox Studio, along with GUI elements that are descendants of the ScreenGui instance. When a user spawns or respawns, instances are copied to . Performance-wise, it is recommended to not use this service and instead copy GUI instances from the client to avoid replication to server and ultimately to other clients.https://devforum.roblox.com/t/divorce-the-loading-of-startergui-from-characteradded/1667282/3
;
:A service that serves as a container primarily for instances, which will be copied to once the user spawns and every time the user respawns.
;
:A service that holds two containers: and . Instances under StarterCharacterScripts are copied to the user's character whenever the user spawns and are deleted when the user is respawning, while instances under StarterPlayerScripts are copied to which do not become deleted every time the character spawns. Scripts will also run in PlayerScripts. If a instance named "StarterCharacter" is parented to this service, it is used to spawn a user's character instead of the avatar. Similarly, if a instance named "StarterHumanoid" is parented, the instance is copied to the character instead of the default Humanoid.
===Optional services===
These services are not visible by default but can be obtained by the Service tool:
;
:A service that serves as a container for instances.
;
:A service that serves as an interface for the in-game chat, chat filter, and bubble chat, as well as for displaying text over characters and parts.
;
:A service that serves both as an interface for automated translation and as a container for instances.
;
:A service that is designed for Roblox to run analytical tests on the engine. The service also provides an interface for facilitating running tests on a place as well as controlling run time properties of the data model in Roblox Studio, and also acts as a container for scripts which can be executed via ; however, it is recommended to run () an instance of the data model before calling the method to avoid changes on the main environment. also automatically execute the scripts when the data model is run.
;
:A service that serves as an interface for voice chat.
==Interface services==
Some other services which are not visible have interfaces that extend the functionality of a place and are designed to be used by scripts.
;
:A service that serves as an interface for run time properties and Task Scheduler events. It is primarily used to implement loops based on render stepping.
;
:A service that serves as an interface for scheduling removal of certain instances. It is primarily used for clearing unwanted instances in the data model that would otherwise remain.
;
:A service that serves as an interface for prompting purchases, retrieving product information of assets, developer products, passes and bundles and determining the user's ownership of items of any of those types. This service is primarily used for monetization.
;
:A service that serves as an interface for HTTP requests and exposes methods for manipulating JSON data. HTTP requests are blocked by default (including requests made by plugins) and can be enabled through . HTTP requests are primarily used for external web services. However, HTTP requests cannot be made to any Roblox website.
;
:A service that serves as an interface for tags used to group instances. It is primarily used for designating a custom class of certain instances, such as parts that can kill a character upon touching which is handled by a single script.
;
:A service that serves as an interface for retrieving group information. It is primarily used for assigning users depending on if they are an ally or enemy of a group.
===Cloud services===
Certain services provide interfaces for manipulating or communication of data outside a server within an experience, known as cloud services. They have a corresponding Open Cloud API designed for third-party programs, allowing them to manipulate the data within the experience rather than from Roblox Studio.
;
:A service that serves as an interface for data stores which are used for storing persistent data that can be accessed from all places within an experience. Data stores are primarily used for storing player data.
;
:A service that serves as an interface for memory stores which are used for storing data that rapidly changes. Unlike data stores, memory stores are faster to access and they store data temporarily within a certain lifetime. Memory stores are primarily used for matchmaking and leaderboards, as well as caches for persistent data.
;
:A service that serves as an interface for cross-server communication. It is primarily used for global announcements.
===Special services===
These services serve merely as methods for specific purposes, i.e., generally not suitable for implementing other systems but still can be used in a system.
;
:A service that serves as an interface for interpolating properties of instances through , which supports many data types: number, boolean, CFrame, Rect, Color3, UDim, UDim2, Vector2, Vector2int16, Vector3, and EnumItem.
;/
:These services serve as interfaces for user input. Many properties of user input are accessible by UserInputService while ContextActionService is used to bind user input to functions.
;
:A service that serves as an interface for pathfinding.
;
:A service that serves as an interface for insertion of instance data which is retrieved from the Roblox platform, such as models or accessories.
;
:A service that serves as an interface for asset related queries.
;
:A service that serves as an interface for preloading assets.
;
:A service that serves as an interface for retrieving policy information about a user. It is designed for developers to have their experiences compliant with national regulations for multiple countries.
;
:A service that serves as an interface for real-time performance information about the current data model, including resources and overall memory consumption.
==Internal services==
There are other services which only serve internally to be used by the engine, meaning that they do not have an interface that can normally be used by scripts. However, core scripts (scripts with elevated thread identity which can only be used by Roblox) can make use of these services. They will not be listed here as they lack official documentation and are subject to change.
== References==
Category:Scripting