Motor6d isn't getting right orientation from script

to create tool’s offsets

  1. What is the issue? Include screenshots / videos if possible!
    Motor6d aren’t getting properly orientation i asked
  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    None of them

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

	local Clone = flashlightITEM:Clone()
				local Attachment = Instance.new("Motor6D",Character.RightHand)
				local animation = Character:FindFirstChild("AnimationFolder"):FindFirstChild("equipFlashlight")
				
				Attachment.Name = "FlashlightAttachment"
				Attachment.Part0 = Clone
			
				Attachment.Part1 = Character.RightHand
				Attachment.C0 = CFrame.new(-0.03, -0.5, 0) * CFrame.Angles(90, 0, 0) 
			 -- this is not full localscript

CFrame.Angles equivalent to CFrame.fromEulerAnglesXYZ which require radians instead of degrees as function parameters.

Try using math.rad to convert your degrees to radians.

2 Likes
CFrame.fromEulerAnglesYXZ(math.rad(90),math.rad(0),math.rad(0))

Thank, i having losing the hope.

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