Help with multiplayer and singleplayer servers

I want to give the player the choice of being in a singleplayer server, or a multiplayer open world server, while it still being the same place. How do I change how many people are allowed to join for the same place? Sort of like a private server.

EDIT: How do I change IN-GAME how many players can join?

1 Like

You cannot change that. For Roblox the starting place is always the public place which is shown as well in the Servers tab on Roblox game page. In case you want to have an inaccessible server, you have to teleport the player to different place.

So best solution for you is to have two different place “Singleplayer” and “Multiplayer”, or in case you want to have a multiplayer game accessible from the Roblox game page, create only one different place called “Singleplayer”.

I can understand this can be tough solution since you basically have to copy your game from one place to another, to keep the same gameplay.
Other thing is that you can write a script, which will ensure that the game is singleplayer for current player, by kicking every new player which joins the server. But I wouldn’t really recommend this solution since this server is always shown on Servers tab, and new players which are redirected to this server automatically after joining the game would be kicked without a reason.

1 Like

You could teleport the players to another server instead of kicking them ig, but yea, its better to simply make another place

2 Likes

Why don’t you just copy the place and have two duplicate places?
One has the server size set to 1 and the other has it set to however many you want in a multiplayer server.

I know this isn’t what you’re asking, but why wouldn’t this work in your situation?

1 Like

Reserved Servers should be used for this, it’s similar to how non roblox games create a local server and connect the player to that server using “localhost” or “127.0.0.1” as the ip (fun fact, Studio also does this but let’s not get off-topic)

Reserved Servers is what most games on Roblox use to transition players to different servers, like something like Notoriety or Entry Point reserve a server and teleport whoever was in your lobby to that server (this can be a single user or 3 other players)
Sure it’s easy to create a seperate singleplayer place but that’s the equivalant of making a seperate server project and client project with singleplayer functionality in a non roblox game, there is reason why Minecraft changed this from true singleplayer to hosting a local server instead.

9 Likes

Because every time I make a change to my combat or anything in the world, I’ll have to change it for both places, which takes longer. The game has lots of scripts that I edit every day, and I’m always adding new things.

1 Like

If you want the players to be able to choose which type of server they want to join, you should use the matchmaking API. It allows you to put a server in a queue and it will find players that want to join your server. The open world property specifies if the player can join the server at any time (open world) or if they have to join at a specific time (closed world). You can also specify if the player needs a password to join the server.

1 Like

I’ve been trying out Reserved Servers and they work perfectly for what I’m trying to do, thank you! I will mark this as the solution, and also thanks to everyone who replied.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.