How to move welds on an axis (part) for rotation

Hello, I try to make a rotation of welds around a part but without success. Here are 2 videos: with my script and other what I would like.

local pivotPart = Model.Pivot
    if pivotPart then
        local pivotCFrame = pivotPart.CFrame
        Weld.C0 = Weld.C0 * CFrame.Angles(0,0, Power*dt) 
    end

robloxapp-20230706-1949266.wmv (692,9 Ko)
robloxapp-20230706-1950272.wmv (2,1 Mo)
What calculation can we do? Thank.

1 Like

Why not use a Motor or a HingeConstraint? A Motor is basically a rotating weld.

1 Like

Because the model must not be anchored… And a motor work only in client sooo :frowning:

Motors work fine for me for my vehicles on the Client and the Server. I use them for steering and for my construction vehicles which are unanchored.
Why won’t a HingeConstraint work for you? They can be set up as a Motor to rotate at whatever speed you want (like a wheel spinning hinge) or set up as a Servo to control whatever angle you want (like a steering system hinge that angles the wheel to whatever angle you set it to)
Are you thinking of Motor6Ds that work on the Client.

Please tell us what you are trying to rotate so we can suggest the best way to accomplish it. For example a tank turret, or a lever, or a windmill.

Yes then the problem with the Hinge is that the model is welded, it is a vehicle. So the servos can’t be seen… I’m trying to make a mower arm (like a crane arm with multiple rotations)

Yes, go to my profile and have a look at my Construction Site game. Almost all the vehicle controls are with Motors. You can change Motors to act like servos as well by setting the DesiredAngle to what you need.

When you say the servos can’t be seen do you mean visually, or in a script?
You need to add them with a script and save the model with the joint in it during a test in Studio, or just put a script in one of the 2 Parts you need to hinge with the Motor that creates the Motor instance, and set the parameters in the script.

Wow, so all vehicle work with motor6D ? but I thought it only works in local… The welds of the vehicles prevent the visual rotation of the hinge. If I remove these welds then the different parts fall into the void because nothing supports them. If I anchor the model then I can’t move the vehicle while I move the parts…

I don’t use Motor6Ds, I use Motors and I’m pretty sure the controlling script isn’t a local script, it’s a server script.
A friend also mentioned that any time items are joined with Motors (or HingeConstraints) you should make them the same Density. If you have parts with different Densities then they act glitchy.

How your car work, you weld the car ? For me i weld car and I can’t move anythink. If i destroy weld all car destroy.

Make sure none of the car Parts are Anchored and you don’t have a weld going to a baseplate or somehting else that’s Anchored.
Don’t weld the wheels to the car, just the car parts to the chassis.
Go to your Models tab and look at the Constraints tab, Click the boxes for Show Constraints and Show Welds.
Active Welds show as green lines. Inactive Welds (like welds to anchored parts) show up as grey lines.

Make sure your wheel HingeConstraints have their ActuatorType set to Motor, and their AngularVelocity and MotorMaxTorque is set fairly high. Start with 100,000 and tune it if you need to.

If you still have issues you can PM me the model so I can help out.

Can you accept my DM please. Thank you for help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.