AngularVelocity and LinearVelocity not working?

I’m making a fly script for a drone, however it doesn’t work, and for whatever reason, on both the LinearVelocity and AngularVelocity the .Active property isn’t true. Any help would be appreciated!

	local Attachment = Middle.Attachment

	local LinearVelocity = Instance.new("LinearVelocity", Attachment)
	LinearVelocity.MaxForce = 400000
	LinearVelocity.Attachment0 = Attachment

	local AngularVelocity = Instance.new("AngularVelocity", Attachment)
	AngularVelocity.RelativeTo = 0
	AngularVelocity.MaxTorque = 400000
	AngularVelocity.Attachment0 = Attachment

	UserInputService.InputBegan:Connect(function(Input)
		if Input.KeyCode == Enum.KeyCode.W and Controlling == true then
			LinearVelocity.VectorVelocity = Camera.CFrame.LookVector * Speed

			AngularVelocity.AngularVelocity = Vector3.new(AngularVelocity.AngularVelocity.X, 5, AngularVelocity.AngularVelocity.Z)

		elseif Input.KeyCode == Enum.KeyCode.S and Controlling == true then
			LinearVelocity.VectorVelocity = Camera.CFrame.LookVector * -Speed

			AngularVelocity.AngularVelocity = Vector3.new(AngularVelocity.AngularVelocity.X, -5, AngularVelocity.AngularVelocity.Z)

		elseif Input.KeyCode == Enum.KeyCode.A and Controlling == true then
			AngularVelocity.AngularVelocity = Vector3.new(5, AngularVelocity.AngularVelocity.Y, AngularVelocity.AngularVelocity.Z)

		elseif Input.KeyCode == Enum.KeyCode.D and Controlling == true then
			AngularVelocity.AngularVelocity = Vector3.new(5, AngularVelocity.AngularVelocity.Y, AngularVelocity.AngularVelocity.Z)

		end
	end)

	UserInputService.InputEnded:Connect(function(Input)
		if Input.KeyCode == Enum.KeyCode.W and Controlling == true then
			LinearVelocity.VectorVelocity = Vector3.new(0, 0, 0)

			AngularVelocity.AngularVelocity = Vector3.new(AngularVelocity.AngularVelocity.X, 0, AngularVelocity.AngularVelocity.Z)

		elseif Input.KeyCode == Enum.KeyCode.S and Controlling == true then
			LinearVelocity.VectorVelocity = Vector3.new(0, 0, 0)

			AngularVelocity.AngularVelocity = Vector3.new(AngularVelocity.AngularVelocity.X, 0, AngularVelocity.AngularVelocity.Z)

		elseif Input.KeyCode == Enum.KeyCode.A and Controlling == true then
			AngularVelocity.AngularVelocity = Vector3.new(0, AngularVelocity.AngularVelocity.Y, AngularVelocity.AngularVelocity.Z)

		elseif Input.KeyCode == Enum.KeyCode.D and Controlling == true then
			AngularVelocity.AngularVelocity = Vector3.new(0, AngularVelocity.AngularVelocity.Y, AngularVelocity.AngularVelocity.Z)

		end
	end)

Can you show us your hierarchy (Workspace, where the velocities are)?

The velocities are parented to the attachment, the attachment is parented to a MeshPart in the model itself, and the model is parented to the Workspace.

image
(Mock recreation, the drone is being cloned from RS on the server, and the velocities are being created from the client.)

I think the issue is that you are applying the AngularVelocity to an Attachment, which will not work. You need to apply the AngularVelocity to the part you are trying to spin.

What line do you see this on, if I may ask? The parents of the velocities don’t matter, if that’s what you’re talking about.