Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

When is the function "GetService" used?

I've seen many people use the function GetService, but always get confused on what it does. All I know is it returns an instance, but can somebody break down what that means?

1 answer

Well GetService is when a service such as Workspace, Lighting, Players, Teleportation, or other service through the game is called. For instance, I know that a exploiter renamed the PlayersService so he wouldn't get banned, I could do game:GetService("Players").ThenGetTheFool'sNameHere:Kick()

This service is used in multiple admin scripts due to the creator of the admin not knowing what others could be doing to their game. And I might be wrong, but Quenty's Admin Commands renames workspace, so the GetService will help avoid problem.

This discussion is preserved as it was. New answers, comments, and votes are closed.