Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How do I spin a part that is welded to another part?

Asked by
NewGPU 34
2 months ago
Edited 2 months ago

Hello, I want to have a constantly spinning part but it has a parent that is also a part that is welded to the part I want to spin.

I have highlighted what I want to spin in RED and what I don't want to spin in BLUE Image

I currently use this script but it spins both the parts.

while true do
    script.Parent.CFrame = script.Parent.CFrame * CFrame.fromOrientation(0,0.4,0)
    wait(0.01)
end

0
I've tried googling but I came up empty handed. NewGPU 34 — 2mo
0
I think the welding causes both parts to spin in unison. You need to unweld it and place the red object’s CFrame based on the blue one and spinning it at the same time. Rheines 582 — 2mo
0
Alternatively, use hinge constraints. Rheines 582 — 2mo

1 answer

Log in to vote
0
Answered by 2 months ago

You can't spin one part by itself if both parts are welded; they'll spin in unison. You can make the surface of an anchored part a Motor and attach the other part to that Motor (the other part must be unanchored). (Use RotVelocity to control the motor speed if you do this.)

0
Cheers. NewGPU 34 — 2mo
Ad

Answer this question