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

What are the variables to detect servers? [closed]

Asked by 3 years ago

I want to make a script that detect if the person owns the server (Private Server) I want to make it so they have the power to kick/ban people from their server.

0
Try This and if it works i would love for you to upvote me! ~~~~~~~~~~~~~~~~~ game.Players.PlayerAdded:Connect(function(plr) -- activated on player join if plr.UserId == game.PrivateServerOwnerId then -- is the player the vip server owner? --They stay! else plr:Kick() -- They don't own it! end end) ~~~~~~~~~~~~~~~~~ Coder_1 27 — 3y

Closed as Not Constructive by JesseSong

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
Qariter 110
3 years ago
Edited 3 years ago

If you are going to allow the VIP server owner to run kick/ban commands, then do Player.Chatted events. As @Coder_1 said, you can use plr.UserId == game.PrivateServerOwnerId to detect the owner.

A second, more friendlier approach, is to make a GUI that is given to private server owners.

Ad