Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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) * CFrame.new(0, 0, 0))
	wait()
end

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

✓ Accepted answer

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

3 comments

0

I didn’t expect for someone to answer my question 1 month later.

0

I’ve actually tried HingeConstraint and it didn’t work but sure I’ll try CylindricalConstraint.

0

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

This discussion is preserved as it was. New answers, comments, and votes are closed.