Check out example codes for "random.range unity not working". It will help you in understanding the concepts better.

Code Example 1

//Do u have using System too? If so u have to specify w
UnityEngine.Random.Range(1, 10);

Learn ReactJs, React Native from akashmittal.com