I was wondering if it is possible to datastore the server a player is in when they leave so that when they join, the game checks if that server is still open and offers to put them in there, and if it is closed or the player wishes to join another server it puts them in a server with their friends/whatever the default priority is.
The purpose would be implementing world changes based on player decisions, world boss defeats, clanhall upgrades, etc. and if everyone leaves the server, it would restart that progress, but as long as the server remains open, their effects remain and the player can rejoin the same server at a later time.
I think I know how to store the data, but I don’t know how to retrieve it for the player upon exiting and what I would do when they rejoin.
Not sure how reliable this would be with a datastore, but I bet you could get it working pretty well using Message Service to communicate between servers.
Roblox, please expedite Network Scripts!
It seems like a place’s server is identified by a unique jobID.
This site is telling me to use TeleportService:GetPlayerPlaceInstanceAsync to get the job ID and to transfer a player with TeleportService:TeleportToPlaceInstance.
I was thinking that I could save this jobID and when a player joins, have a choice on a GUI that teleports them to that server or a random server.
I copy pasted their example for my basic teleport scripts, but I can’t seem to wrap my head around how this works.
I was looking into messaging service for another application, but other than the example of notifying players when another player joins or leaves, I can’t figure out how to apply it here.
You could send that job id to other servers using message service and then use that to send players to one server. I think I might have misunderstood your idea for the world changes though. You could definitely save progress for a player in the datastore and then update the map locally to reflect their individual progression through events. Message service would be more of just a practical way to share server information across all servers. I’ve used it to create global chat systems before, it’s pretty cool.
1 Like