You can use a sine wave for this:
Code: ags
(Just add this to your room script and adjust the object's script name and initial y coordinate of 120.)
float angle;
function repeatedly_execute_always {
angle += 0.03;
if (angle > Maths.PI * 2.0) angle -= Maths.PI * 2.0;
oHoverboard.Y = 120 + FloatToInt(Maths.Sin(angle) * 10.0, eRoundNearest);
}
(Just add this to your room script and adjust the object's script name and initial y coordinate of 120.)