Save ALOT of blocks properties?

So i want to make a gardening game where you can plant plants and i wanted to make it so that if the player has a shovel and click on a block of one of these grid, it removes it. I can code that but, how would i go to make when the player leaves it saves the removed blocks?

Also how can i make it not buggy since there is gonna be 6 people in the server

4 Likes

I would save a list of the positions. I also wouldn’t do this with that many parts. You could either use unioning operations(union a negative cube with the center of the coordinate they clicked(you can do some math to calculate which grid tile they clicked) or use the new EditableMesh API(generate a rectangle of triangles, make vertices and triangles to subtract a bit, but this would be pretty advanced)).

1 Like

how would i go to unioning operations? can u detail?

You would need to save in a 2D array, all the states the blocks have. For example, None, Dug, Planted, and other properties they may have like PlantId, Watered, PlantEndTime, etc.

In my opinion, these blocks should be bigger. Mobile users won’t like pressing such small sections on their screen. It’s almost as big as one of their legs!

(edit): No… don’t use unions. :sob:

i dont think unioning nor using triangles is a good idea…

if i were him, I’ll stick to using blocks

try setting the network ownership to the server BasePart:SetNetworkOwner(nil)

what do you mean using keep using blocks

basic parts
Sisjdiejduwuhdusdjdjdjsjdjsjjs

i know but how would i save EVERY part position and if its there or not???

If I were you I would just set the transparency to 1 and turn collisions off to destroy blocks. it wont render the object so no lag. I dont know how you’d save it tho

you can use a table, but for me, i think it’s best that you name/tag each part by number, then store a table of numbers with true/false values

you can use data stores to actually save it

Woah i didnt think about that thats a genius idea!