Help with spinning a part that is attached to a weld

So I want to make a plane propeller that spins but I don’t know how to only make the part spin without spinning it with the other welds.

Do not use WeldConstrains, use Motor6Ds, those are intended for moving/rotating parts and keeps it welded at the same time

2 Likes

Is there any easy way to set this up?

Script:

local part = script.Parent
local Motor6D = part:WaitForChild("Motor6D")

local function setMotor6D()
	Motor6D.C0 = Motor6D.Part0.CFrame:Inverse()
	Motor6D.C1 = Motor6D.Part1.CFrame:Inverse()
end

setMotor6D()

I also don’t know how to rotate it.

local RS = game:GetService("RunService")

local function SpinMotor(motor, rotationSpeed)
	RS.Heartbeat:Connect(function()
		motor.C0 = motor.C0 * CFrame.Angles(math.rad(rotationSpeed), 0, 0)
	end)
end

local part = workspace.Model.Part
local motor6D = part:WaitForChild("Motor6D")

SpinMotor(motor6D, 10) -- the motor and the speed you desire


You could explore other approaches.

  • You could use a Hinge with the ActuatorType to Motor and set its properties so it spins automatically

Depends on the type of spinning you need.

HingePowered:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.