Trying to make a model saver

So basically I’m making a game where you complete endings, and get trophies, but unfortunately at the moment I have no robux to get badges, so I can’t really use the Idea I had in mind.

I’m trying to make it so if a value is set to True, it’ll save the model’s transparency, if the trophies transparency is set to 0, it’ll indicate that the player has been awarded that trophy, and if the transparency of that model remains 1, it’ll indicate that the player has NOT been awarded the trophy.

If and when the player leaves the game, and joins back, the model should check to see if the value is set to True, and if it does, then it repeats the process with keeping the transparency to 0.

My issue is that the script of the model will either; A, find the value but won’t set it to anything, B, It’ll find the value, and will set it to true, but will not edit the model transparency property, or C, all of the above.

My question is, is there a way to make this work? or shall I wait to get badges so I can tell the game to check if the player doesn’t the badge, if they don’t, the badge will be awarded, and so will the trophy, (script will edit the transparency of the model) but if they already have the badge, the game will continue to keep the transparency of the model set to 0?

Please note, this game is a single player game!

You will have to re-write everything when you get proper badges, so I don’t really see implementing this being a good use of time.

However, my own opinion aside, you can absolutely store the value in a DataStore and tell the trophy to do what you want based on the stored value in the datastore such as 0 or 1.

1 Like

You should save booleans instead of 0 or 1.

2 Likes

See, now I tried that but it wasn’t really helping me much.

So use the boolean store, as I said, and if it isn’t destroy it.

1 Like

Thanks for this! I did not know Lua stores a bool value as something other than 0 or 1.

2 Likes