script.Parent.DialogChoiceSelected:connect(function(player, choice) if (choice==script.Parent.TurnIn) then player.leaderstats.Money.Value=player.leaderstats.Money.Value+player.Chips.Value player.Chips.Value=0 end 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