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

Admin script not kicking a player from the game?

Asked by 5 years ago
Edited 5 years ago

I've been making a UI-based Admin Script and when you type a player's name and run it it doesn't show any errors or kick them from the game.

001-- Script in ServerScriptService
002local SS = game:GetService("ServerStorage")
003local DSS = game:GetService("DataStoreService")
004 
005-- "Allowed" users
006local Staff = {"Gavfoox","Warriorfoox","Player1","WhistleCats"}
007local Banned = {}
008--local Staff = {GroupId=0; RankId=0;}
009 
010 
011local Players = game:GetService("Players")
012local _B = DSS:GetDataStore("DS1_BANS")
013local _C = {} do
014    for c=48,57 do table.insert(_C,string.char(c)) end
015    for c=65,90 do table.insert(_C,string.char(c)) end
View all 111 lines...

I do not actually know what the issue is here, but it isn't doing what it's expected to do when kicking/banning members.

2
Hey, ban me from your game and I'll change my name to bypass the ban because of how unsecure your ban system is. User#24403 69 — 5y
0
Will do Warriorfoox 25 — 5y
0
@incapaxx oof thats gotta sting Mr_Unlucky 1085 — 5y
0
Your Robux not mine Warriorfoox 25 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

So theres alot that can be changed and made better on yours.

I made my script very quickly before I had to leave.

Heres an example, Id recommend you to base yours off of mine. I dont have much time to explain, im sorry but im being rushed out the door rn.

01local Players = game:GetService("Players")
02local Http = game:GetService("HttpService")
03local Datastore = game:GetService("DataStoreService")
04 
05local Admins = {"Player1"} -- If you are going to use player names, make a function to convert to userid
06local GroupIds = {
07    {
08        Id = 00,
09        Rank = 254
10    }
11}
12local NeededRank = 254
13 
14local Banned = Datastore:GetDataStore("Banned")
15 
View all 88 lines...
0
I will be back in about an hour to finish this. Im sorry, but heres a good basis for what you should use. Never use username, people can change their name and come right back. ALWAYS use UserId. MessorAdmin 598 — 5y
0
players can change their userid too, so whats the point cegberry 432 — 5y
0
lmao what players cant change their userid? Mr_Unlucky 1085 — 5y
0
LOL WHAT. Players cant change their UserId unless they are exploiting and are REALLY fast at changing it before the .PlayerAdded event gets to them connecting. MessorAdmin 598 — 5y
Ad

Answer this question