How to chnage value of timer peform delay using math random

How can you chnage the time of timer perofm delay by using math random since it only uses math random once then keeps using the same on

This should work fine…

timer.performWithDelay(math.random(a, b), myListener, iterations)

Hi it choose a random number and then stays the same, How can it chnage the value everytime

Yes, the time is random every time this function is called.

It sounds like you want to call a listener at random intervals?  If that is the case, I would do something like this:

local function listener() -- do something here -- reset timer.performWithDelay(math.random(a,b), listener, 1) end timer.performWithDelay(math.random(a,b), listener, 1)

Am I understanding what you are trying to do?

This should work fine…

timer.performWithDelay(math.random(a, b), myListener, iterations)

Hi it choose a random number and then stays the same, How can it chnage the value everytime

Yes, the time is random every time this function is called.

It sounds like you want to call a listener at random intervals?  If that is the case, I would do something like this:

local function listener() -- do something here -- reset timer.performWithDelay(math.random(a,b), listener, 1) end timer.performWithDelay(math.random(a,b), listener, 1)

Am I understanding what you are trying to do?