How to go about these aspects of a tycoon game

Hello! Ive been attempting to make a sort of theme park tycoon 2 game, except not with theme parks, and i recently got help with the building system.

Now im wondering how do i go about loading and saving the players data after they place their objects (i havent really gotten far in the placement system yet, so i think thats worth noting). For example:

How do i make a system that assigns a player an open tycoon plot and ONLY loads their data to that plot. Because right now my fear is Timmy will join the game and get plot 1. Timmy builds up and then leaves. Timmy rejoins and gets assigned plot two, sadly Timmys data has just loaded in plot 1, on top of Jeffs data.

All help, guidance, and tips are appreciated

1 Like

Find an empty plot and load the data into there.

Not sure how your game is structured, but I personally store player made structures in folders which are named after them and if I want to find an empty plot I just use FindFirstChild with the default folder name as the argument.

How should i go about finding and assigning open plots?

Not sure how your system works so I can’t direct you anymore, but I gave you an example on how I find empty plots.

I suggest making an “Owner” string attribute for each plot folder/model and then you can easily see from both client and server who owns what plot and if it is occupied or not. When it isn’t occupied it’ll just be "" and yeah once it gets occupied you just set it to the player’s name obv

1 Like

Okay thanks, this will help!

Any idea how to load the players data into the plot

Well that completely depends on how you have set up your tycoon system. Since its a theme park where players can place stuff anywhere they want I suggest doing serialization on all the parts they’ve placed down (with coordinates, etc), and then save that. You could then load it again easily.

1 Like