So like the wall on Pet Simulator with the buy button on the wall and you need a certain amount of coins to enter. I have everything set but the code for it. Can someone help me?

14 comments

0

Are you trying to purchase it or getting the required coins to receive it?

0

i am trying to purchase it and make it disappear

0

Then your gonna have to something like [if value >= price then value = value - price] and [script.Parent:Destroy()] if that's true

0

Do you have a datastore set up? I dont know if it would be best but, i would make a datastore and create a bool value for that wall, initially its false then when its bought you'll make it true, that way it saves the players progress automatically. Then for the wall all you'll need to do is set up a script where you'll require X coins, and if player has X you remove X, and turn the barrier

0

^ Yeah and Datastore if you have one set up

0

transparent and collide off. Then also turn the bool value to true.

0

i tried that and it always says invalid something so could you type a good one up for me?

0

-1 for saying that. ^

0

You've been given the neccesary information to make it happen. If you have any issues with the code ill gladly help. Otherwise i think this thread is done!

0

i just dont know how to do it and need help

0

like i tried all the stuff and it has invalid lines and i just need help

0

i would like as much help as possible

0

please someone else help