I'm using math.random() to add values between 1.99 and 3.99 to player.leaderstats.Dollars.Value. However, when using math.random() the numbers were randomized, but came out as integers. Here's the code I first attempted to do this with:
client.leaderstats.Dollars.Value = client.leaderstats.Dollars.Value + math.random(1.99, 3.99)
When I realized that the numbers were being rounded, I added 2 "NumberValue" objects to the script (so... script.min, and script.max). "script.min.Value" was equal to 1.99, and "script.max.Value" was set to 3.99. Here's what I tried:
client.leaderstats.Dollars.Value = client.leaderstats.Dollars.Value + math.random(script.min.Value, script.max.Value)
The numbers were still being rounded to integers. How would I go about fixing this?

3 comments
Multiply math.random() by max, and then clamp it by min. Example: math.clamp(math.random()*3.99, 1.99, math.huge)
What does math.clamp() do?
clamps a number between min and max. args: n, min, max. if n is less than min, it becomes min. if it is greater than max, it becomes max. otherwise, it returns n.