Hello, I am making a pen clicking simulator that will have updates to the pens when you click it x amount of times. In the upgrade one part I am having trouble. It skips over the if statement at the bottom. is there a way to make the script stop until the if statement is met? Or maybe an else function to send it back to a certain line so it will eventually hit the if statement? Thanks in advance y’all are great.
-- Upgrade1.0 function local function upgrade1(event) if(event.phase == "ended") then audio.play(click) penclicklevel = penclicklevel - 1 penbodyrect = "one/pen.png" end end -- Upgrade1.0 button upgrades1 = widget.newButton { width = 45, height = 35, defaultFile = "images/upgrade1.0.png", onEvent = upgrade1, alpha = 0, } upgrades1.x = 4000 upgrades1.y = 200 if (penclicklevel \> 1) then upgrades1.x = 200 penclicklevel = penclicklevel \* 2 end