I suck at scripting so I need help. Sorry for actual embarrassing dum mistakes
Basically, I’m making a shop system where the player goes into a store and interacts with an item’s proximity prompt. If they have the amount of money that is needed to purchase the item, they get it in their inventory as a tool and the mesh is destroyed. What players see and interact with is just a mesh. A sword is given to them, a tool. But this doesn’t work.
The cash system was made using leaderstats
Here is the sad script
sword1 = the mesh sword
sword2 = the tool sword
When running this script nothing came in f9 when i playtested. Help is appreciated thanks
what specifically doesn’t work? Also, is this a script or a local script? Local scripts cannot change datastore values.
I assume there are no errors either. In the future, please avoid using screenshots of code and instead paste your code into a code block.
Did any of the print statements appear?
This is the mesh sword with the script, it’s properly being referenced. And it still doesn’t work…
Perhaps the code:
sword2.Parent = plr.Character
isn’t the right way to get the tool inside the inventory? But then again… The sword is not destroyed when the PP is interacted with (and when I have enough money) so that’s weird too