Getting TargetPosition of PrismaticConstraint from Vector3

I basically want to set TargetPosition of PrismaticConstraint from a Vector3 X, Y, or Z value.

With an image:

I want to calculate that “Target” as a TargetPosition value of PrismaticConstraint.
Can I do this?

You can use magnitude to get the distance between your root part and the target as an integer and then plug it into the constraint.

local Target = Vector3.new(20,20,20)
RootPart.PrismaticConstraint.TargetPosition = (Target - RootPart.Position).magnitude