I need help making a ban script

To make a ban script, just save the player’s UserId with DataStoreService, and when a new player joins the server, check if they are on the ban list.

local function ban(player)
    player:Kick("You have been banned.")
    
    banEvent:FireServer(player) --On the server, save the player's UserId
end
6 Likes