How can I make a random number generator like RNG World Cup?

I want to make a RNG like RNG World Cup.
Here is the link to the game: RNG World Cup
I recommend you play it before responding.
It will generate a random number and it could go on infinitely.
I can’t figure out how.
I have looked, but haven’t found any solutions.

Here is an example of how I think it works:
It generates a random number 0-9 and if it lands on 0 it will roll again and say if it rolls a 1 on the next try its output will be 0.1.
If you still don’t know what I mean say it lands on 0(0), but we will roll again and if we get another 0(0.0) then we will roll again and if it is 5 it will be 0.05 and so on.
(I don’t know if what I am saying is completely accurate)

I think you’re overthinking this. Random | Documentation - Roblox Creator Hub

u can use this code for that


--// math.random(point1,point2)
math.random(0,100)
1 Like

the thing is this only returns whole numbers unlike RNG its decimals.

? u showed Rng rolling decimals and i said that math.random(e1,e2) doesnt return decimals just like rng
so i printed math.random(1,100) 100 times where do u see a decimal at any point in time?

My bad, I thought you were talking about something else. However, Random:NextNumber does return non-integers (and it’s just more flexible in general).

1 Like

Nah your good and yes Random:NextNumber() does return non-integers :slight_smile:

1 Like