Helicopter blade drifting away

  1. What do you want to achieve? I want to be able to keep the helicopter blade from drifting away as it spins.

  2. What is the issue? The helicopter blade drifts away as it spins, not sure if its the script or how the blade is orientated (its not like leaning sideway or anything, just perfectly flat)

  3. What solutions have you tried so far? Searched for solutions on Devforum and others sites, but nothing is helping.

This is how it looks at the start of the game:

And after 3 minutes:

The scripts that spin the blade:

local TweenService = game:GetService("TweenService")

local bladePart = script.Parent

local rotationSpeed = 720

local startAngle = 0
local endAngle = 360

local rotationTween = TweenService:Create(bladePart, TweenInfo.new((endAngle - startAngle) / rotationSpeed, Enum.EasingStyle.Linear), {
	Rotation = Vector3.new(0, endAngle, 0)
})

-- Play the rotation tween in a loop
rotationTween:Play()
rotationTween.Completed:Connect(function()
	-- Reset the rotation angle and restart the tween
	bladePart.Rotation = Vector3.new(0, startAngle, 0)
	rotationTween:Play()
end)

Additions Informations:
The blade orientation is flat, and all of the blade meshes use a “WeldConstraint” to stay intact with a Spinning Part (the part that spins the whole blade). The Spinning Part is not anchored, but it is welded to the helicopter body in order to move along with the Helicopter.

Do you know why the blade could be drifting away? I’ve spent days trying to fix this up, but no luck.

I believe the issue is using .Rotation and welds. Using the .Position or .Orientation related properties will disconnect the weld temporarily causes the issue.

Typically you should use weld C0 and C1 to ensure the offsets stay the same.

An alternative is to use Rigid Constraint (Same as weld) and tween the attachment 0 or attachment1.

1 Like

Alright, thank you, I will try this out and see how it goes.

does this chopper just sit on the ground and blades rotate or does it actually need to fly?

There is another script that flies and moves the helicopter itself and the script I listed spins the blades.

ok yeah one the best/easiest ways to do this would be use a HingeConstraint set it as Motor and set to use two attachments, place one attachment at the base of the blade then another in the helicopters main part and position it at the blades attachments worldposition then set the angularvelocity

Oh and if you setup like this it really only needs a script to change the angularvelocity nothing else

2 Likes

This works, thanks for responding to my post!

1 Like

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