local anim = editChar:GetSelAnimation(); local pct = 0; if (anim.NumFrames > 1) then pct = (frame - 1) / (anim.NumFrames - 1); end y = math.sin(math.pi * 2 * pct) * 50;