I have a movePlatform function in my code and when ever i finish moving the platform I call a resize function this is the code:
elseif event.phase == "ended" or event.phase == "cancelled" and moving == true then if(platformTouched.x \>= 72) then timer.performWithDelay( 0, blockExpand, 1 ) end end
This is my blockExpand function:
function blockExpand() block:scale( 5.0, 1.0 ) end
My problem is, every time I tap and then release, the block scales up, and then if i repeat it again, it scales up again, so as long as i keep tapping and releasing, the block keeps scaling infinitely.
What i want to achieve is, no matter how many times i tap and release, the block only scales up ONCE and stays the same size. Is there any code to set the size of it instead?