I'm using a localscript to copy bricks from lighting into a new camera to turn them into local bricks. These act like the coins from Mario Bros., but the coins you got don't respawn after you die, meaning coins you haven't collected would still remain on stage, while coins you've collected are gone for good.

How can I make sure coins I've collected don't respawn, while the ones I have collected do?

3 comments

0

I think I understand what you are saying. You want the coins that you have already collected not to be copied from Lighting when you respawn? If that is the case, I would try making a table of the bricks and only copying the bricks in the table. That way, when you collect a coin you can remove it from the table, causing it not to copy the next time.

0

And as I just realized you used the Data Persistence tag, I would like to add that you can save tables to Data Stores (which I would recommend) in JSON encoding.

0

Uh-huh, that makes sense. I'll try that. Haven't had much experience with tables before though so this'll be new to me.