Thank you so much for this! I've been banging my head for hours against why using a random value stopped the platforms from generating in my game. I didn't know the random numbers generated would be anything other than integers! This has really helped, thank you so much!
Argh I'm so happy I finally got past this problem.