I need help rotating a Motor6D in a viewmodel that I have, when the tool is equipped. I have everything already, but no matter how I change the C0 and C1, it gives the wrong orientation in game. I tried multiplying them against itself too, but I dont understand Motor6D CFrames.
handleMotor.C0 = CFrame.Angles(90, 0, 0)
handleMotor.C1 = CFrame.Angles(0, 0, 0)
The above code does not give the correct orientation. It doesnt even change the orientation on a single axis like I want, instead the whole tool is positioned based off of that. I dont want to change the position, just the rotation of the tool. I can give more information, but I feel my problem lies in how I am changing the CFrames of the Motor6D
I can successfully set the C0 and C1 to 0, 0, 0, but if I set the C0 to 90, 0, 0, then the result actually comes out as 63.38, 180, 180. This is not what I want.
I have tried use math.rad, I have also tried setting 2 Vector3 values, 1 for Position, and 1 for Rotation, and settings a CFrame that way, which didnt error, but gave me about the same random results I was getting before. I dont see any consistencies with this property and its confusing. All I need to do is set the rotation of the C0 property in a motor6d. This has been very frustrating to figure out, and I am at a loss. This has been going on for a few hours now too lol, thanks everyone for helping out so far.
Thank you, let me know if I need to include more information.
!
This is when the rotation of the CFrame is set to 0,0,0
image_2024-05-12_145145816|690x457
This is when the rotation is set to 0,90,90. Even with math.rad, it gives the same results.
I currently have:
local handlePosition = Vector3.new(0,0,0)
local handleRotation = Vector3.new(0,90,90)
handleMotor.Part1 = handle
handleMotor.C1 = CFrame.new(handlePosition, handleRotation)
This gives me the second image. Even when using math.rad. Its the closest I have come so far.