Add Gold requirement to Costumes. [Need Help]

Hello, I'm using the Multiplayer Costume Template from the Community Content. I'm a new Core Creator and am still trying to learn. I Haven't use Lua before so sorry if this is a easy question. When i add player:RemoveResource("Gold", 75). To the Servercostume script. It does take away the Gold but still lets me constantly get the item even if i have less gold then it asks for. Whenever i try to run this check for how much gold there is with this.

if (player:GetResource("Gold") < 0) then

Then it breaks and doesnt even equip the costume. Can anyone help me figure out how to use the Gold resource to buy stuff and not let it work if there isnt enough Gold?

Hi. Try the "dungeon" framework. There is a good store there, suitable for your request.