of     1   

AX94
#160231886Wednesday, April 15, 2015 8:37 PM GMT

I wrote this money system script, and I don't have access to a computer to test it. It would be awesome if someone could test it for me. Copper, Silver, and Gold are IntValues within a GUI: local CC = script.Parent.Copper.Value local SC = script.Parent.Silver.Value local GC = script.Parent.Gold.Value function MoneySystem(silver) if CC.Value >= 50 then CC.Value = CC.Value - 50 SC.Value = SC.Value + 1 end end function MoneySystem(gold) if SC.Value >= 500 then SC.Value = SC.Value - 500 GC.Value = GC.Value + 1 end end script.Parent.Copper.Value.Changed:connect(silver) script.Parent.Silver.Value.Changed:connect(gold)
Qorm
#160232439Wednesday, April 15, 2015 8:46 PM GMT

didnt need to test it, looks functional- should be fine
YasuYoshida
#160232755Wednesday, April 15, 2015 8:50 PM GMT

Incorrect. local CC = script.Parent.Copper local SC = script.Parent.Silver local GC = script.Parent.Gold function MoneySystemSilver() if CC.Value >= 50 then CC.Value = CC.Value - 50 SC.Value = SC.Value + 1 end end function MoneySystemGold() if SC.Value >= 500 then SC.Value = SC.Value - 500 GC.Value = GC.Value + 1 end end script.Parent.Copper.Changed:connect(MoneySystemSilver) script.Parent.Silver.Changed:connect(MoneySystemGold)
Qorm
#160232857Wednesday, April 15, 2015 8:52 PM GMT

@above didnt see that only because i use :connect(function() end) as a method instead of that
AX94
#160248041Thursday, April 16, 2015 12:33 AM GMT

Thanks for the edit, Dev. I haven't written a code in a while, so I'm a bit rusty.
YasuYoshida
#160276983Thursday, April 16, 2015 2:24 PM GMT

I haven't done functions like this in a long time, but I still remember if it's right or wrong.

    of     1