i am still working on a Tycoon game and have a logic question:
I am making a Game with 6 Tycoons, all identical, for 6 player, lets call them Blue, Green, Red,…
I am saving all the progress in RepStorage/DataStorage/DataStore whatever.
If a player exits, i save his Tycoon progress.
When a player returns, i restore his progress
BUT
this only would work, if the player gets the same Tycoon back as he had before, so if he had Tycoon “Blue” he would get “Blue” back, as though the Tycoons are identical, the Positions of the parts are not, as they are placed on different locations.
Now the actual question: I guess i would need to guarantee that the player always gets the same Tycoon when he joins a game (for example always the blue one), so i would need a lobby to see if a game with an empty blue Tycoon is available? How would i find this out and distribute into emerging games?
You can do this with MessagingService and contact to server and check empty tycoon for blue.
But I don’t recommend doing this because MessagingService disconnect some times.
But you can calculate money amount from bought things, and save money amount to datastore.
This will not automatically restore it, but you will get the money amount back.
When a player Joins and touches for example Red Team
His Tycoon will load on the Red Coordinates and Orientations
And if you want you can set all the Tycoon Colors, give them the same name and with a for i,v in ipairs you Could change the BrickColor so any player will be’ able to load his tycoon on any position