Try switching Code: $angleZ = $angleZ * (Handle2.Amplitude / 2); to Code: $angleZ *= (Handle2.Amplitude / 2);