random() is always a float.
round(random(6)) = 0-6 Attention, 0 and 6 have only half chance, as opposed to the other numbers.
floor(random(6)) = 0-5 || int(random(6)) = 0-5
ceil(random(6)) = 1-6
Set text to str(ceil(random(6)))
Read manual:
random(x)
Generate a random float from 0 to x, not including x. E.g. random(4) can generate 0, 2.5, 3.29293, but not 4. Use floor(random(4)) to generate just the whole numbers 0, 1, 2, 3.