How would I go about doing this?

I want to create a shop in my game but I don’t want to create a bunch of data store scripts and make my usual spaghetti code. I’d like some advice and some techniques to do.

I want to make an accessory shop that saves.

How would I go around doing this, without making spaghetti code

A shop that saves… what exactly?

You should first think about your entire shop, how it’s gonna work, then you should break it up into smaller pieces, and try to make each piece as best as you can. Doing multiple things at once can be quite hard to keep track of, and that mostly causes bad code. We also cannot just tell you “how to” write good code, i recommend first trying to make it, then wherever you feel like you got a bad code, coming back to this thread and posting a question here if it could be improved in any way.

1 Like

If you want to save data look into ProfileService

1 Like

There’s a tutorial by VectorThree on YouTube but I think the channel name is different now

1 Like

I also did not want a bunch of code for a datastore; it’s just too overwhelming and confusing for me.

So I searched around and found a video that explains how to create a datastore using Folders and Values.

It is very simple and easy to modify:

1 Like

I don’t get it, if you don’t at least try to do it you won’t really experience it, some people use ProfileService, which is completely fine, but I’d argue that just for theoretical reasons to go with a raw implementation for experimenting, unless that’s not an option, in which case, completely understandable that you want to do things quicker.

1 Like

This is not my post. I replied to offer a simple solution that I use myself.

I don’t like writing a bunch of code if I don’t have to.