local TeleportService = game:GetService('TeleportService')
local placeID = ("your place id here")
local players = game:GetService("Players")
local maxPlayers = players.MaxPlayers
local groupID = 1
local modRank = 1
players.PlayerAdded:connect(function(plr)
if players.NumPlayers == maxPlayers then
if plr:GetRoleInGroup(groupID) >= modRank then
print("Moderator slot filled")
else
TeleportService:Teleport(placeID, plr)
end
end
end)
game.Players.NumPlayers is deprecated. That means it’s an old method which has been replaced, but it should still work (best practice is to not use it).
Alright to summarize things, the only options are to either kick or teleport someone:
You can fix this by using a script along the lines of what @inkfog and @ExercitusMortem said:
local TeleportService = game:GetService('TeleportService')
local players = game:GetService("Players")
local maxPlayers = players.MaxPlayers
local placeID = (Game id here)
local groupID = 1 --Example number
local modRank = 1 --Example number
players.PlayerAdded:connect(function(plr)
if players.NumPlayers == maxPlayers then
if plr:GetRoleInGroup(groupID) >= modRank then
print("Moderator slot filled")
else
TeleportService:Teleport(placeID, plr)
end
end
end)
@inkfog I noticed a problem in your script while typing the summary:
This would only work if the amount of players in the game were equal to the amount of max players (this person is joining when the player count is less than the max players. This can be fixed with my modified script:
local TeleportService = game:GetService('TeleportService')
local players = game:GetService("Players")
local maxPlayers = players.MaxPlayers
local playerCount = #game.Players:GetPlayers()
local placeID = (Game id here)
local groupID = 1 --Example number
local modRank = 1 --Example number
players.PlayerAdded:connect(function(plr)
if playerCount == maxPlayers -= 1 then
if plr:GetRoleInGroup(groupID) >= modRank then
print("Moderator slot filled")
else
TeleportService:Teleport(placeID, plr)
end
end
end)
As far as I’m aware, without kicking players it is impossible to “reserve” server slots.
You can use the kicking method that people are posting, however I wouldn’t use it since players might get frustrated being constantly kicked when trying to join because the moderator slot is full.
Best thing you can do in my opinion is require proof to be sent to your moderators when they receive reports.
Your current system for reporting is flawed because many cheaters create one-off accounts to exploit and never use them after because they may get banned.
Have your reports sent through a method that allows videos to be attached and links to be embedded so users can attach a video (Either a direct file or youtube upload) to then verify that the user is cheating before banning them.
The players already get teleported to another game once the get kicked. I don’t think this would be frustrating because there would just be a slightly longer wait time to join the game.
The whole point of this was to have extra mods join the game, not to have mods be able to ban players for cheating… Good idea though.
Roblox doesn’t automatically reconnect you when you get kicked. They give you the option to manually reconnect, but many users will simply leave when they are kicked. Additionally, it can have an impact on the recommendation algorithm, so I wouldn’t recommend kicking players for no reason
I mean I had read some History of this chat. And no one has mentioned this method isn’t good. But depending on how much time you spending making this system, why don’t Using Memory Stores Be good to hook up this. Adding Servers to the Memory store, removing if It’s Becomes ‘full of normal users’. When a player joins a full server It’s gets data from the memory store, to teleport the player to a low count server? I don’t use Memory Stores that often, But I have Heard it and Seen it in similar posts… Is this a good method and would it work? Or would it just be a mess to handle.