So I've made a server ban system, and before everyone mentions it, I know this is not the best way to make a ban system, but In this case this is how i wanted to do it, so...
how the ban system works is:
The ban command kicks the desired player, and to prevent them from joining that server again, It creates a BoolValue with the exact kicked player's name inside a folder.
Meanwhile a server script constantly checks for players that join using the PlayerAdded event.
I tried to make it check if the player that just joined matches name with any of the Values inside that folder, it went terribly, and instead it just kicked any player that joined, no matter they name.
How could I make this work?
How do I check If the player that joins matches name with any of the values in the folder?
Nevermind, I figured it out myself, the following script seems to have worked:
local Bans = game.ServerStorage.BanList function BanCheck(player) local user = player.Name if Bans:FindFirstChild(user) then player:Kick("You're banned from this server") end end game.Players.PlayerAdded:Connect(BanCheck)