Changing variable every second

Hi, does anyone know how to change variable every X seconds using random.range?

Never mind, got it using invoke repeating

this is explained here and here i hope it helped