Weld position but not rotation

im using align position constraints to make sure the invisible track wheels (for a tank) are in the same position as the moving wheels. the track wheels have beams on them so they cant rotate.

build align position constraints code:

local r = Instance.new("AlignPosition")
local a0 = Instance.new("Attachment")
local a1 = Instance.new("Attachment")
a0.Position, a1.Position = Vector3.new(0, 0, 0), Vector3.new(0, 0, 0)
a0.Parent = v
a1.Parent = wheel.WheelBase
r.Attachment0 = a0
r.Attachment1 = a1
r.RigidityEnabled = true
r.ApplyAtCenterOfMass = true
r.ReactionForceEnabled = true
r.Parent = v

i cant just put the constraints on the wheels since the wheels rotate and that will make the beams turn with them.
the current setup works fine until the tank starts to turn (see video)

used ball in socket constraint and it worked

nvm this didnt worked, still working on it

I’ve used Trails to leave fading treadmarks under wheels. Beams should work similarly.
For mine I used 2 Attachments on the Part that the wheel HIngeConstraint is attached to. This is so the Trail doesn’t rotate with the wheel, but always aligns at the wheel bottom. The Attachments are the inboard and outboard edge of the wheel, so they run side to side.

I’m pretty sure your issue is the Attachments are on the bottom centers of each wheel, and the beam’s second Attachment point is on the next wheel bottom center. It appears you are trying to use AlignPosition to keep the Attachments aligned though?
You don’t need to script any of this. You can just click on each Part and add an Attachment Positioned at the base of each track wheel (the non-rotating ones) and rotate the arrows to align them the same way. The beam should go from one to the next and you won’t have to worry about aligning them.

so i didnt feel like rerigging the entire track since its tons of attachment that need to be position in a certain way. so i found out a different solution that would work with my current rig.

i have two parts for the springs and the rotation axis (see picture)

so all i did was weld (and i cant believe i didnt think of this first) the track wheels to the block (not the cylinder) so it still moves with the wheel and still has the spring motion to it while not rotating at all

so to get them working with the fixed wheels all i did was just copy the brick and moved it over (see picutre)
did the same thing there but except of springs i just welded that part to the wheel (didnt rotate surprising) and welded the track wheel to that brick and it all worked fine. but probably next rig ill do ill try your method because it seems better

Yeah, The way I did it was without the CanCollide off wheel and just put the Attachments in the hinge block.