Lock movement on certain axis

hi i am making an object move using line trace through a tutorial
the tutorial is for physics and non physics object both
my concern is with non physics. now i can move it but i dont want to move it in z axis
i cant find a way to do this since i cant use constraints because this is a non physics object
using set world location

1 Like

i can move it but i dont want to
move it in z axis

See if this does it:


Script bin:

2 Likes

thank you so much for this
but i fixed it by simply not giving it z input
thank you so much for this ,i will use this for future purpose