#Ban not working

1 messages · Page 1 of 1 (latest)

vale dagger
#

Ban isn't working.

#
            ["Function"] = function(player: Player)
                local BanPlayer = game.Players:FindFirstChild(player) or split[2]
                
                local id = game.Players:GetUserIdFromNameAsync(player)
                
                if ds:GetAsync(id, true) then
                    player:Kick("You have been banned permanantly! This ban is not appealable!")
                    ds:SetAsync(id, true)
                end
                
                if BanPlayer then
                    local id = game.Players:GetUserIdFromNameAsync(player)
                    
                    for i, v in ipairs(game.Players:GetPlayers()) do
                        v:Kick("You have been banned permanantly! This ban is not appealable!")
                        ds:SetAsync(id, true)```
#

does kick, no saving though

lunar violet
#

wouldn't this code only run on /ban?

#

so the code that checks if your banned

#

only runs on /ban