Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make a new server?

Asked by
sheepposu 561 Moderation Voter
4 years ago
Edited 4 years ago

I am making a game with the main map and another separate place being the lobby. I already did the code for communicating between servers. Now the only problem I have is if there are no available servers, then I'll have to make a new one. The only problem is that I don't know how I can do that. I want to teleport the player to a newly created server. Thx in advance for any help!

2 answers

Log in to vote
2
Answered by 4 years ago

I don't really see why bother with bots n' stuff when you have good ol' TeleportService:ReserveServer.

It lets you make a new, empty, private server you can TP players to at will!

The only thing you have to worry about is to keep track of the access code that it returns across your lobbies, but since you already have something set up to communicate servers, that shouldn't be a big issue at all now should it?

More info at https://developer.roblox.com/en-us/api-reference/function/TeleportService/ReserveServer

1
No clue that existed. Pretty cool. Farsalis 369 — 4y
0
Right? Again, only issue is sharing the access code, so I've not quite messed around with it enough. Pretty sure the new messaging system ROBLOX added should make it easier than it used to be, though. Jahaziel_VanDerHas 238 — 4y
1
Ah yes, I forgot about private servers sheepposu 561 — 4y
Ad
Log in to vote
0
Answered by
Farsalis 369 Moderation Voter
4 years ago

Hm, this is definitely a very abstract idea. But, as far as I know. A script inside of roblox cant make a new server. But, a bot API can (If the max amount of players is 1). So basically you could send a message through roblox into a discord webhook, have that same webhook send a message in that discord chat, e.g.("!CreateServer"), then maybe have a discord bot pick up this message, then that bot initialize a roblox bot API, starting by creating a roblox bot, then having that bot click on that game (Easier said then done.). I dont know how you would do this, maybe trial and error, as I have never done this before. Though it may be more complicated than worth.

0
Hmm... this definitely does seem complicated. I have experience with discord bots and stuff like that, so I could maybe do it, but for now I'll wait on any other answers, thank you for your answer sheepposu 561 — 4y
0
Yeah, like i said trial and error, a couple times and you could get it right. Farsalis 369 — 4y

Answer this question