script.parent.ClickDetector.MouseClick:connect(function(player) local thevault = game.Workspace.Vault thevault.Value = thevault.Value - 500 end)
This is something really simple im just confused.
Im trying to get the value inside of an object to change when a user clicks on the actual item itself.
Any suggestions?
Alright, so as you mentioned in your comment, you're getting an error that you are trying to subtract a number from an instance(vault). Instead of this, try changing thevault.Value to thevault.NumberValue.Value, as the actual value is a property of the NumberValue instance.
If this helped, remember to accept it as the answer so that others are not confused. If you have any questions at all, please comment. :D