Help With my Ban System

I’m making a Ban system but something is not working I don’t know how to fix it.


I know that I can’t kick a non-local Player from a local script but I already tried to pass the local script to a script but isn’t working.

The Script:
image

Please help me!!

What’s the script? We can’t help you without it

So use local player = game.Players.LocalPlayer.

I will upload it pls wait :grinning: :grinning: :grinning:

Uploaded
pls help me I really need it :slight_smile: :slight_smile: :slight_smile:

You can’t kick from local, so you need to learn RemoteEvent to communicate thru client to server.

Ok I’ll read about it thx for answer

Here’s example code (you need to edit it)

--localscript
button.MouseButton1Click:Connect(function()
remoteevent:FireServer(textbox.Text)
end)
--Server
remoteevent.OnServerEvent:Connect(function(plr,plrtokick)
game.Players:FindFirstChild(plrtokick):Kick("kicked")
end)
1 Like

Don’t use this, please, if you do at least add some sort of sanity checks to make sure the player is an administrator and or has privilege’s to execute your ‘command’;

if plr.UserId == 0 then
   // Run code
end

Don’t worry only Me can use The ban system.