I'm trying to make a button that increases your current currency. I used this guide:
http://wiki.roblox.com/index.php?title=In_Game_Currency#CurrencyManager
And made my own script:
local click = script.Parent.ClickDetector.MouseClick
local curman = require(389753980)
local currentGold = {}
local updatecurev = game.ReplicatedStorage.UpdateCurDis
click:Connect(function(player)
local balance = curman:GetBalance(player.UserId) + 1
currentGold[player.UserId] = balance
updatecurev:FireClient(player, balance)
end)
It updates the currency, but it only works once. What do I do?

3 comments
Thanks, it works, but the currency gets reset to 0 from the initial of 100 (set using a function inside the module)
Edited, try something like that
thanks now it works