Is there a way to change the number of people limit in settings in-game?
If not, I would like to know how to create another world and move it when the random number of people limit in the teleporting world is reached.
Usage: Once a player dies, it cannot be reconnected. / After 2 minutes, no additional players can connect.
Structure: LobbyWorld → Instance Dungeon
※ This document uses Google Translate. Please forgive me for the lack of content.
Help!
No, there is no way to modify the maximum number of players while in game. The closest you can get is something like this:
MaxPlayers = 5 -- MaxPlayers that you want at that particular time, NOT the actual max amount of players
game.Players.PlayerAdded:Connect(function(plr)
if MaxPlayers < #game.Players:GetPlayers() then
plr:Kick("Maximum players reached")
end
end
In regards to your alternative, I’m not overly familiar with the teleport service, so I’ll leave that for someone else to answer
2 Likes
thank you for the reply!
Additional question) Is there a way to know the information of the world you want to move to before moving through the teleport service?
I wonder if this is a possibility with this update.
YouTube link: Roblox updated the server list! - YouTube
ex) Created time, number of participants, etc.
I do not really think that the top suggestion is a solution. You could possibly teleport the last person who joins to another server as that would be a much better solution on teleporting players from full servers.
Here is a way of how to do it. I will be using the example from @SeargentAUS.
local TeleportService = game:GetService("TeleportService")
MaxPlayers = 5
game.Players.PlayerAdded:Connect(function(plr)
if MaxPlayers == #game.Players:GetPlayers() then
TeleportService:Teleport(<write the place id here>, plr)
end
end
Also one thing for @SeargentAUS the if statement would always be false since the player would never get more than the max players so basically it wouldn’t work, you would need to check if the player folder is maxed after a player has joined.
@windmill_a if you have got the solution already please don’t forget to solution an answer as that would make it so other users would not need to answer an already answered question. Thanks in advance!
Hope this helps you!
1 Like
Thank you for answer.
in the way you told me
If you send the last visitor back to the lobby, who should not log in due to the limit of the number of people, they will come back to the same world again and it seems that another method is needed.
[Lobby → Dungeon #1 → Lobby → Dungeon #1] is repeated.
Basically it gets the last player who has maxed out the server and teleports him to another server of the same game.
As mentioned please don’t forget to solution a comment.
1 Like
Additional question) If I use the same place id, will a different server be created?
Let’s try!
Thank you very much.
new problem? : It doesn’t teleport right away, so it seems like a bug in the interval between moves could be an additional problem.
To others: If you have another good method or opinion, please let me know.
Depends, the roblox system would make it so the player joins an already created server. If all servers are full it would create a new server. Also what do you mean by teleporting right away? The teleportation threw places is done on how fast the request for teleportation is made in the roblox servers, if the location of the current server is not close to you for example you like in Europe and the server you are in would be in America, of course that it would take some time in order for the request for teleportation to be sent to the server and back to the player and this is something that cannot really be avoided.
So time on how fast teleportation is done can’t really be avoided.
Neither users can choose their location for their servers.
For example: If you have played tower defense simulator you will notice how you don’t really teleport right away after the elevator has gone fully down. Instead you would get teleported in a different time. Sometimes the teleport could be fast and others be really slow which would happen usually in laggy servers.
tip: you can check your ping and know if you are actually away from the roblox server as there are a lot of servers in roblox that would host the running server games.
1 Like
An infinite connection (infinite loop) was attempted to the returned world, and the program stopped.
The way you told me doesn’t seem to work.
Thank you for answer.
Could you show the message that you have gotten as an image?
As mentioned above there is no way to make teleportation faster, I even gave an example of another game that has the same issue. (Not really a huge deal though.)
1 Like
The loading screen is exposed and blinks, and the loading screen is exposed, so you cannot check the error message.
Question, how are you testing it?
1 Like
I am using a smartphone, roblox player, and bluestacksx.
So… did you set the maxplayers to 3 in that case?
1 Like
The game progress time generated when connecting to the game
When it is longer than 1 second, it is set to.
ex)
local GameTime = 0
while true do
GameTime = GameTime + 1
wait( 1 )
end
if GameTime < 1 then
teleport ~
end
Entry restrictions in the game
- When the maximum number of people is reached,
- If two minutes have elapsed since the game started,