Value is a float array. If you remove the square brackets the error will go away, but what is the purpose of this float array? And is there a reason why it is an array?
Another possibility is that you put the operations backwards, should be this:
But Random.Range might give a float, which isnt usable as an index in an array, so it has to be converted into an int. And even if it did work, it makes me wonder why there are 100 values, and why the first 20 are excluded.
I am well aware of the overload method, but I’ve had situations where the int overload didn’t come up when I just put in numbers like that, and I would need to deliberately Ceil or Floor the value.
Can’t say I’ve ever had it go that way - I have experienced scenarios where I wanted a float and got an int back by mistake though. Sort of the downside of those implicit downcasts.