Scripting Helpers is winding down operations and is now read-only. More info→
Log in to vote

How to make a character move with the spinning part using CFrame?

Asked by 1 year ago

I'm trying to rotate a model using its PrimaryPart. It is working, but it doesn't move my character. I tried using BodyForce and Constraints like weld and hinge, but nothing works. I saw an answer in the DevForum saying you will use LookVector, but I didn't understand how. Here's the code:

while true do
    script.Parent:SetPrimaryPartCFrame(script.Parent:GetPrimaryPartCFrame() * CFrame.fromEulerAnglesXYZ(0,0.05,0) *, 0, 0))

It would be much better and appreciated if you changed the script for me. I would still appreciate your time for this problem. Thanks!

1 answer

Log in to vote
Answered by
Puppynniko 1059 Moderation Voter
1 year ago
Edited 1 year ago

Use a CylindricalConstraint or HingeConstraint make sure AcuatorType is Motor add a attachment to a part and set the HingeConstraint.Attachment0 to the part you want to spin and HingeConstraint.Attachment1 to a part thats anchored and inside of Attachment

I didn’t expect for someone to answer my question 1 month later. T3_MasterGamer 2189 — 1y
I’ve actually tried HingeConstraint and it didn’t work but sure I’ll try CylindricalConstraint. T3_MasterGamer 2189 — 1y
also you might be setting it up wrong as i tried it and it worked perfectly fine with both and you can get a free model from the toolbox that has this just search Spinning platform Puppynniko 1059 — 1y

Answer this question