Okay so I don’t really know where to put this but since it involves being banned and a script to do that I think this is a good place to do it.
So I made a little script that bans you.
table.insert(ServerBanned,1,PLR.UserId)
-- a bunch of lines later
Players.PlayerAdded:Connect(function(plr)
for i,v in pairs(ServerBanned) do
if v == plr.UserId then
plr:Kick("You are banned")
end
end
end)
But the thing is: I don’t know if it works because I am unable to rejoin with the Player1 account that is created when making a test server. So do any of you know how can I rejoin on that account?
(Or could you tell me if that table would actually work because I have no way of testing it alone really.)
No, go to the test bar in studio press “Start” on an icon with a server rack and youll get a server window + the amount of windows (players) you specified. They’ll all be named player1-8.
Hm not yet I’m waiting for them, they’re available to us devs though. As a property of the player object.
There’s some rules;
The player’s display name will be always the same as their characters name. So you can’t do (game.Workspace[plr.Name]) but you can do game.Workspace[plr.DisplayName]. But you should just use plr.Character.
Multiple people can have the same one so actually no you shouldn’t do game.Workspace[plr.DisplayName].
They can’t have spaces, they can’t have… anything a normal username can’t.