Quick Lua Issue

Sorry if this is the wrong area I didn’t see the Modders Help forum. Please move this over if I did in fact put this in the wrong location.

here is my issue:

function randomizer(value)
    local n = math.random(0,1)
        if n == 1 then
return true
    elseif n == 0 then
return false

function engineY()
local car = getPedOccupiedVehicle(jij)
setVehicleEngineState(car, true)
setTimer(setVehicleEngineState, math.random(1000, 2000), 1, car, false)
setTimer(setVehicleEngineState, math.random(5000, 8000), 1, car, true)
setTimer(setVehicleEngineState, 9000, 1, car, false)
setTimer(setVehicleEngineState, 9200, 1, car, true)
setTimer(setVehicleEngineState, 9400, 1, car, false)
setTimer(setVehicleEngineState, 9600, 1, car, false)
--setTimer(setVehicleEngineState, 1, car, math.random(0, 1))
setVehicleEngineState(car, randomizer())

I am trying to get the engine state to randomly select True or False… The last line doesn’t seem to do anything so please tell me what I am doing wrong?

Thanks in advance

Try this section.

Thank you