You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
Make a ban that is only in the server (like a phantom forces kick)
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Couldn’t find any youtube tutorials or other ways on resolving this.
I would like to make a phantom forces kick type system (not a votekick) but a server kick that whenever a player tries to rejoin that server they are instantly kicked.
Nevermind, I figured it out. for everyone wondering this is the code I used
local mytable = {}
game.Players.PlayerAdded:Connect(function(plr)
if table.find(bantable, plr.Name) then
plr:Kick("you are banned")
end
end)
plr.Chatted:Connect(function(mes)
if string.lower(mes:sub(1,4)) == 'ban/' or string.lower(mes:sub(1,4)) == 'Ban/' then
if plr.Name = "RealTrickshootz" then -- my roblox name
for i, player in pairs(game.Players:GetPlayers()) do
local mes1 = string.lower(mes:sub(5))
local plrnamee = string.lower(tostring(player))
if string.match(plrnamee, mes1) and string.lower(mes) ~= "ban/" then
table.insert(mytable, player.Name)
player:Kick("You have been server-banned.")
end
end
end
end
end)