I'm making a function that can be called from the main module to the GUIHandler when the player clicks the purchase button in the GUI. This function is supposed to (when the player clicks the button) confirm that the player has enough currency to purchase the item, then decreases the amount of the player's currency by whatever the item price is. For some reason I am getting an error stating that I need a function call after "then"
local function Purchase()
if Plr.DataLog.Cubits.Value >= 10 then
Plr.DataLog.Cubits.Value - 10 --This line is where the error is occurring.
else
print("Insufficient Funds")
end
I am really stumped at this. Any advice will be great, thanks!

1 comment
Can you show me the exact error that is in the console?