Random Light colour with random object spawning

I’m having an annoying issue whenever I want to change the colour of 2 lights, depending on the outcome of a random array selection which results in a “Ball” spawning at 1 of 4 location (2 left - 2 right).

When not attached, the random array selection works perfectly, spawning the object “Ball” at a random location every 4 seconds.

However when I attach the light blueprints, it changes the array selection and random number somehow so that they no longer match.

It’s a strange question I know, but I cant wrap my head around it.

Thanks for any help!

You need to set the RandomIntegerInRange to a variable. Since your technically accessing it twice in a single instance it has the chance to return different values.

If you set it to a variable only once at the beginning and use that variable value for both the Ball and the Light it should work fine.

Solved my problem, you are the best!:smiley: