What method to use when moving part?

Hi guys,
I have a bit of a problem. I am trying to move the small part (as seen in the image below) along the red line and to the large part with the red circle above it. I have looked at a few methods of achieving this but none work.

TweenService: Doesn’t work as TweenService does not factor in collisions and I need collisions in the game.
Linear Velocity: Does not work as part must be unanchored and I need it anchored
AlignPosition & AlignOrientation: Do not work for same reason as Linear Velocity

Basically, no constraints work. The other method I was thinking about using is CFrame but I don’t know how that would work.

If anyone is wondering, the red line drawing the two parts is simply just a beam.

Edit: Just to clarify, I do not want to teleport the part. I am trying to simulate a walking effect where the part moves at a constant speed towards the target and if there is a collision the part will just stop where it is.

well, if you NEED collisions and it can’t be anchored, then you have pretty few options

a. you can do the math for when to stop the part early(would be especially bad considering rotatinons)
b. shapecast(blockcast) the small part along the line to find the point it needs to tween/lerp/move to

(try option b)

If you want to be consistent with the speed I would reccomend what @oOmekooOo said. If you just want the object to go in that direction, just use :ApplyImpulse() or smth

A system like this is exactly what I am trying to make:
https://gyazo.com/19c993da6bcc1a0015af63c0f467f696

As you can see, the part is anchored and does fall over (I think its anchored), and it has non collide. The soldier can walk around a specified path. In the gif, I think they use parts to draw the lines whereas I’m using beams. I don’t think it makes a difference though.

Do you have any other ideas as to how I can replicate a system similar to this?

i think the conquerors might use humanoids and Humanoid:Move() for their little soldiers (or atleast thats the easiest solution i can think of).

then its just a matter of moving them to the point set by the mouse. it doesnt get any more complicated than that

What about the non humanoid objects though? Such as planes and tanks?

humanoids don’t need to be human-looking

But does that mean I can add a humanoid to anything and call humanoid functions on it? E.g my lifeless, small part can just magically become a humanoid?

It has some other basic requirements, but essentially, yeah


What are the other requirements? I’m going to try and use humanoid:MoveTo instead

I don’t have anything more than surface level experience with humanoids, but there should be plenty resources available

(looking up anything regarding “custom characters” should probably yield results)

1 Like