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

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

Asked by
NewGPU 36
5 years ago
Edited 5 years 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 36 — 5y
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 661 — 5y
0
Alternatively, use hinge constraints. Rheines 661 — 5y

1 answer

Log in to vote
0
Answered by 5 years 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 36 — 5y
Ad

Answer this question