this is an acceptable loop for your experience level, it's not perfect but nobody makes perfect code when they're still learning
get rid of those print statements unless they're actively being used for debugging, it's just cleaner and less laggy
i would recommend getting into the habit of using task.wait() over wait(), for most applications it doesn't matter but using task.wait() is generally considered better practice because it performs better. they're identical otherwise.
also, it's a matter of choice mostly, but if you want to type slightly less while modifying a value, x = x + 1 is identical to x += 1, you could write part.Position += Vector3.new(0, 0.01, 0) instead.
discussing implementations now, it's generally better to use tweenservice or a bodyposition over changing position in a loop like this. tweenservice is used for anchored parts, while bodypositions are used for unanchored parts. bodypositions use roblox's velocity system, and that allows them to carry other parts (this is especially important if it's something like a platform the player is meant to ride on!!!), while anchored parts would require a custom carrying implementation to have the same effect.