Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

When is the function "GetService" used?

Asked by
Xduel 211 Moderation Voter
10 years ago

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

Log in to vote
1
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
10 years ago

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.

Ad

Answer this question