Objects Interaction

Hello
back with another topic
this time about “objects interaction”
basically what i was going to do is
when other object contact the “Main part”, something happens.
image
what i actually need to goal is the object that contacted the part stopping its movement, but i can script that if i know how to make the script run on contact.
i actually did this once but only with UnAnchored parts, when tried to do so with CanCollide part with moving script havent reached the goal.

I’m confused. Why isn’t .Touched sufficient here?

i think i need to show the screenshot of my attempt with unanchored part so it makes some sense.
image
im a quite new to scripting so yea, i have like, issues.

You’re saying you want it anchored? You’re a lil vague towards the end. If it’s anchored, then, by definition, it CANNOT move. Also, what actually IS the issue?

sir nobody denied the fact that i can just do cframe script to make anchored part move
and i think i stated issue? what i want to reach is both parts contacting with eachother
and the one of them moves

okay…but why do you need them to be anchored in the first place?

maybe i actually need to state some video material

what basically happens is when the part contacts the ground (main part) , it stops
but in this attack what i used was just wait(number) function, because just of this issue

You could try tweening the attack. Will be more consistant.

yeah but like, is there any way to make it actually contact with eachother or no?
the part contains a script that makes it moves, and the part itself is cancollide off and anchored