So on press the score goes up one and “GoOne” is printed. What I want is so the user can press 4 time and the “GoOne” is printed. Then on the 5 and so on press the “GoTwo” statement prints. But the code here doesn’t do that. Why?
local score = 0 local function updateScore(event) score = score + 1 end local function go(event) if event.phase == "ended" then updateScore() if score \>= 0 then print("GoOne") elseif score \>= 5 then print("GoTwo") end end end Runtime:addEventListener( "touch", go )
–SonicX278