1 | script.Parent.DialogChoiceSelected:connect( function (player, choice) |
2 | if (choice = = script.Parent.TurnIn) then |
3 | player.leaderstats.Money.Value = player.leaderstats.Money.Value+player.Chips.Value |
4 | player.Chips.Value = 0 |
5 | end |
6 | end ) |
If a player gets 10 chips, it can convert to 1 money. How can I make this work?
if(choice==script.Parent.TurnIn) then for i = 0, 9 do if (player.Chips.Value-i) == 0 then player.leaderstats.Money.Value = player.leaderstats.Money.Value + (player.Chips.Value-i)/10 player.Chips.Value = player.Chips.Value-(player.Chips.Value-i) break end end end