Touch event not working

  1. What do you want to achieve? Keep it simple and clear!
    I am making a train using tweening and nodes but I came across a problem

  2. What is the issue? Include screenshots / videos if possible!
    I made a hitbox for the train and when it hit something the train health will decrease but the touch event don’t seem to be working

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

The red part is where the server script is located in and the selected part is the train hitbox


When the hitbox hit the red thing it doesn’t print anything
I don’t know if this is an easy fix, if it is I will just feel stupid, but I can’t seems to get it working.
There’s no errors


I believe that touched events don’t trigger when you tween an object through one.

Judging by what was said in the post below, I don’t think it will ever be possible.

1 Like

Oh I see but Is there any other way I can do to make it touch or is there none.

I did some testing and it appears there isn’t a way, that I know of to detect touching with your train. You could try to make the train actually follow the tracks like in real life instead of tweening, though that may create more problems.

That is all I can suggest right now, I hope you can complete your development.

I think I figure it out after reading some other posts. I tried using align position and align orientation for and connect them to the tweening part and it worked. The hitbox move slower than the train but it is alright. Thanks for helping!

1 Like

Actually nvm, It seems like I can’t have align position with a welded object. It just doesn’t work :skull:

Edit : I have to actually anchored the tweening part to make it work so I figure it out again now.

1 Like