moving death barrier

in level 4 of my game, i want a death barrier to move on a path and start over when it reaches the end of the path. How do you the that? And the block i want as a death barrier is on the bottom of level four.

Hi, add this piece of code to the “Death Barrier” object.
On Raycast:
Raycast Lenght: 400. Type: “Player” or “Any Type”

On the timer:
Delay: 0. Check Repeat Forever.

It will start moving once the player is in front of it. When their X coordinate is greater than 1443 (end of the level) it will teleport back to its initial position.

Hope it helps :slight_smile:

when i get to the barrier, it is not in the original spot. it moved up

nevermind i just had to turn off movable. and is it possible to make it visible when moving

like right now, it moves but it is invisible

It seems to be working just fine, it’s not invisible. Am I missing anything?

Btw, you forgot to update the ray length to 400.

i don’t know why it didn’t work but it works now. thank you!