Roblox Serverside Script Showcase Kick Gui [upd... Apr 2026
Creating a in Roblox allows authorized users (like admins) to remove players from the server. Because UI is inherently client-sided, a secure "Server-Side" system requires RemoteEvents to pass instructions from the player's button click to the server's authority. 1. Set Up the Communication (RemoteEvent)
In , create a Script . This script must verify that the person firing the event is actually an admin before performing the kick. Roblox Serverside Script Showcase KICK GUI [UPD...
Inside your KickButton , insert a to send the request to the server: Creating a in Roblox allows authorized users (like
: Instead of a TextBox, use a ScrollingFrame that automatically populates with buttons for every player currently in the server. Kick GUI not working - Scripting Support - Developer Forum Set Up the Communication (RemoteEvent) In , create
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RemoteEvent = ReplicatedStorage:WaitForChild("KickPlayerEvent") local targetTextBox = script.Parent.Parent:WaitForChild("TargetName") script.Parent.MouseButton1Click:Connect(function() local name = targetTextBox.Text RemoteEvent:FireServer(name) -- Sends the name to the server end) Use code with caution. Copied to clipboard 4. The Server Script (Execution & Security)
: Use string.lower() on both the input and the player names to ensure it works regardless of capitalization.
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RemoteEvent = ReplicatedStorage:WaitForChild("KickPlayerEvent") local Players = game:GetService("Players") -- List of Admin User IDs or Names local AdminList = {12345678, "YourUsername"} local function isAdmin(player) for _, admin in pairs(AdminList) do if player.UserId == admin or player.Name == admin then return true end end return false end RemoteEvent.OnServerEvent:Connect(function(player, targetName) if isAdmin(player) then local target = Players:FindFirstChild(targetName) if target then target:Kick("You have been kicked by an administrator.") print(targetName .. " was kicked by " .. player.Name) else warn("Target player not found.") end else -- If a non-admin tries to fire the event, kick THEM for exploiting player:Kick("Unauthorized attempt to access Admin Panel.") end end) Use code with caution. Copied to clipboard

