For the past few days I’ve been trying to make a money system where it adds money whenever you complete certain tasks, and stuff like that.
But, as you can see in the screenshots, things go wrong like:
Here is my code:
local reward = tonumber(tostring(math.random(15,35)).. "." .. tostring(math.random(0,9)) .. ""..tostring(math.random(1,9)))
game.ReplicatedStorage.ChangeMoney:FireServer(reward,false)
I know that this is definitely not the most efficient method, but I’ve tried others and they’ve given me the same results.
For example, I followed this on how to randomize decimals, but it has given the same results and sometimes glitches out.
Now, I’m going to clarify my money system.
Basically you do something like walking a dog, or delivery, then it adds money to the money value in a player in another localscript, it listens to the money value using getpropertychangedsignal, and sets the gui as the money value.
I literally have no clue why my code isn’t working.