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

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

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

3 comments

0

I've tried googling but I came up empty handed.

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.

0

Alternatively, use hinge constraints.

1 answer

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.)

1 comment

0

Cheers.

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