I have 4 colors. I want to make it so that the player can\'t be the same color 2 times in a row. When a player collides with an object, the RandomColor() is called.
RandomColor()
What you need to do is add a judgement if the RandomColor returns a same color as prev one, just call it again, easy right?