I’m developing code that goes to points after a button is pressed and it works but for some reason if the button was pressed while the code was already started it does not wait for the button to be pressed again instead it starts automatically as if just skips a few lines of code. my code is below.
MovJ((safe))
while 1 do
while not (DI(5)==1) do
Sleep(1)
end
while not (DI(5)==0) do
Sleep(1)
end
MovJ((StartPos))
for count = 1, math.floor(NumberOfParts) do
while not (count==9) do
Jump((RelPoint(HoleLocation[count],{(offsetXi),(offsetYi),0,0})), {Start=JumpHeight, ZLimit=MaxHeight, End=JumpHeight})
Wait(500)
count = count + 1
print(count)
end
i = i + 1
end
MovJ((safe))
i = 0
Started = 0
end