Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a shop system that saves?

Asked by 6 years ago
Edited 6 years ago

Okay! So, recently I figured out (with the help of someone here on the site) how to make a shop GUI that subtracts ingame points from your player.

But, here's what I'm wondering. There's a button that will prompt you to buy an item. If you click yes, you will have bought the item, and this button will disappear, so it doesn't prompt you to buy that item anymore.

I want to make it so that this button stays gone even when you leave the game and rejoin. I think I know how to do this, but I'm not entirely sure.

The ingame points are stats that the player has, which I put in ServerScriptService- it works with number values. Should I do the same for the button that prompts you to buy the item? Like say for example, the number value of the button is 1. When the player buys the item, the button's value becomes 2 and it disappears. If the value is 2, the button will stay gone, even when you rejoin. Is that possible?

And if so, how would I handle a shop system that has tons of buttons like this? Would I have to make stats/number values for each and every one of them? Or is there an easier way to do this?

I'm not asking anyone to make a script for me, as I know how to do most of this (hopefully) but I'm wondering how I should go about it- whether or not there's an easier method, or if this is what I should do.

0
wha game r u making LiLFriks 39 — 6y
0
Not a request site! User#19524 175 — 6y
0
If you actually read the whole thing, I said I didn't request anything. I was simply asking what direction I should go in, and if my method sounds logical. yoshikins101 11 — 6y
0
You literally just edited it to look like you didn’t request anything. User#19524 175 — 6y
0
Like if you actually think you can edit your question and think I don’t know, you need to go back to primary mate. User#19524 175 — 6y

1 answer

Log in to vote
0
Answered by
CjayPlyz 643 Moderation Voter
6 years ago
Edited 6 years ago

First make a int value inside a folder in the player, If a player buys a item make the int value's value to "1" now make a save script which saves the folder where the int value's are in, then make a local script in the gui that when a player joins it checks if the int value inside him is "1" if it is then the button will be disabled.

P.S i didn't add the script for this because you said u just asked for direction :)

0
Thank you! yoshikins101 11 — 6y
0
Please accept the answer CjayPlyz 643 — 6y
0
? How do you do that? Sorry- I'm new to this site! yoshikins101 11 — 6y
0
Cjay, stop being desperate for reputation. yoshikins101 will not be able to anyways, due to having 0 reputation. User#19524 175 — 6y
0
oh i didn't know that thanks for the info, but how much do you need to accept an answer i haven't seen it in the faq page? CjayPlyz 643 — 6y
Ad

Answer this question