I made this script
local BanData = game:GetService("DataStoreService"):GetDataStore("SaveBan")
script.BanEvent.OnServerInvoke = function(player, PlayerName)
if game.Players:FindFirstChild(PlayerName) then
game.Players:FindFirstChild(PlayerName).Banned.Value = true
game.Players:FindFirstChild(PlayerName):Kick("Banned")
end
end
script.UnBanEvent.OnServerInvoke = function(player, PlayerName)
if game.Players:FindFirstChild(PlayerName) then
game.Players:FindFirstChild(PlayerName).Banned.Value = false
end
end
But obviously I can't use FindFirstChild to unban someone as they can't join the game. How would I change their Banned.Value when they're not in the game?
This is for my Admin GUI and I have made so you can type in the username and click Ban and It will ban them so how would I enter someones username and unban them when they can't join the game?
