Why does this part's Y position sometimes move upwards when I jump near it

I made this minigame for a game working on where lava moves back and forth and you have to jump over it, but sometimes when you jump near it the y position changes to where it is too high above you for it to hit you if you don’t jump. Any ideas how I can set it’s Y position back down? here is the script for the part’s movement.

im a little confused firstly as you have the position’s y value unaffected

Nvm I fixed it

I fixed it I just had a brain malfunction for a sec.

1 Like

What was happening was everytime I tried to make the y position stay constant the part just didn’t move, but now I fixed it by detecting when it wasn’t the proper Y position.