Hey guys I cant seem to figure out how to make it so when the math.random = a certain number then do what is inside the if statement.
local function timer1( event ) tmr = tmr - 1 timerdis.text = (tmr) print(tmr) if tmr == 0 then print("life is over") timerdis:removeSelf() print(options[math.random(1, 5)]) local outcome = display.newText(options[math.random(1, 5)],150,350,nil,32) if outcome == 1 then print("You got 20 points!") end if outcome == 2 then print("You got 100 points!") end if outcome == 3 then print("You got 50 points!") end if outcome == 4 then print("You got 0 points!") end if outcome == 5 then print("You got 30 points!") end end end
