So, I made this ban GUI where you can ban players by there username with a reason. I want to know how to make it so the mods can ban people that are not in the game.
Here's the GUI local script:
local Username = script.Parent.Parent.Username.TextBox.Text
local Reason = script.Parent.Parent.Reason.TextBox.Text
local Evidence = script.Parent.Parent.Evidence.TextBox.Text
script.Parent.Parent.Submit.MouseButton1Click:Connect(function()
if game.Players:FindFirstChild(Username) then
game.ReplicatedStorage.ModEvents.BanPlayer:FireServer(Username, Reason)
end
end)
Here's the server script:
game.ReplicatedStorage.ModEvents.BanPlayer.OnServerEvent:Connect(function(player, Username, Reason)
game.Players:FindFirstChild(Username):Kick("\nYou have been banned for\n"..Reason.."\n By: "..player.Name.. " | "..player.UserId)
end)
If someone could help me, that would be greatly appreciated.
