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

How to get started with in-game server selection?

Asked by
gitrog 326 Moderation Voter
6 years ago

I know multiple games allow selection of specific servers to join through an in game menu. I'd like to know where to start doing this. Please link Wiki Articles, services, or give basics. I don't want you to do anything for me, I want to know where to get started.

0
Could you be a little more specific?? I may be able to help :) GottaHaveAFunTime 218 — 6y
0
I'm pretty sure I answered a question like this before and I wrote a long answer. Try looking it up on here. hiimgoodpack 2009 — 6y

2 answers

Log in to vote
1
Answered by 6 years ago

What you want to do is create a server, and store the ID (or at least that's the way I think it is done, since I've never actually had to make this.)- There is a long wiki tutorial for Dynamic place creation and saving here. If on the other hand, you already know what you want to do, but simply need the api for it, here's the CreatePlaceAsync api. The api allows you to give the id of a place you own, and it will make another server then return its id to you. You can then use teleportservice on that id, to move them to that specific server instead of the public ones.

--Example:
local place_id = 127-- public place id
local personal_id =  game:GetService(“AssetService”):CreatePlaceAsync("New place",place_id)
local player = game.Players["random player you selected for whatever reason"]
game:GetService('TeleportService'):Teleport(personal_id, player)    

If you want more info on teleport service, here is the wiki.

0
Please accept my answer if it helped, or ask any questions. iamnoamesa 674 — 6y
0
How do I pull information from these created places such as how many players are online? gitrog 326 — 6y
0
I believe they add on to your regular place's number of online players. But if you're asking for how to get the number of players per individual server in the place, you would need to keep track of that yourself. I would recommend using datastores, and having the each place update the datastore when the player count changes. When your main place needs to see the player count, check data store iamnoamesa 674 — 6y
Ad
Log in to vote
0
Answered by
Prestory 1395 Moderation Voter
6 years ago
Edited 6 years ago

http://wiki.roblox.com/index.php/TeleportService_guide

Here bro its something called TeleportService this shows how to use it also explains how it works.

If the link does not work just paste this into your browser

http://wiki.roblox.com/index.php/TeleportService_guide

0
I don't need help with TeleportService, I understand how that works. What I want to know is getting information like assigning to specific servers in a place, seeing how many people are in a server, etc. gitrog 326 — 6y

Answer this question