Looks like you have a number of issues going on here...
onready var rollednum1 = RandomNumberGenerator.new()
That does not return a random number as you seem to think. Instead, it returns an instance of a random number generator. That's an object that can generate random numbers...
So, I'd store that in a more descriptive variable. Something like:
onready var rng = RandomNumberGenerator.new()
You probably want to call
randomize once on the new rng object. So, this:
Now, you can use your new random number generator object to generate random numbers whenever you want like this:
var rand_int_1 = rng.randi_range(0, 10) # random int between 0 and 10
var rand_int_2 = rng.randi_range(5, 100) # random int between 5 and 100
Note that you can also generate random
float values using
Finally, if you want to convert an numeric value to a string, you want the
str() function, like this:
text1.text = str(rand_int_1)