floatt=Mathf.Clamp01(scaleTimer/scaleDuration);// Calculate the interpolation factor with a clamp
floatverticalScale=Mathf.Lerp(startScale.y,startScale.y*scaleAmount,t)+Mathf.PingPong(scaleTimer/scaleDuration,0.1f);;// Interpolate the vertical scale
Vector3newScale=newVector3(startScale.x,verticalScale,startScale.z);// Calculate the new scale
transform.localScale=newScale;// Update the scale of the sprite