Motor6D doesnt work on player's arms

  1. What do you want to achieve?
    Im trying to rotate player’s arms with motor6D’s C0 or C1, and its very important that i want to use motor6D’s C0 or C1 not CFrame or something else

  2. What is the issue?

I created a copy of my character and placed it in the workspace, then i pressed Play and switched to server view:
Screenshot_1

Character copy on the right and actual player on the left:

I selected CharacterCopy>>RightUpperArm>>RightShoulder(Motor6D)

I set the X of that Motor6D’s C0 to 90 and it worked perfectly:

But when i tried to do the same thing on the character of an actual player, his hand rotated in some wierd way:

  1. What solutions have you tried so far?
    I tried to disable all my scripts but it didnt changed anything, rotating the other shoulder or any other part of an arm doesnt work either, and i searched for solution for 2 days straight and i didnt found anything please someone help me :sob:, sorry for bad english
4 Likes

What is the purpose of this? What do you need it for?

2 Likes

I want to rotate arms so that they face the cursor

Why can’t you use the Transform property of Motor6Ds?

2 Likes

I didnt heard about this but i tried it just now and it seems like its only working on a client and is quickly overriden by any default animation, i dont want to replicate the changes to every client every renderstep(sounds expensive)

1 Like

Then I’m not really sure how you would do it, perhaps you can disable the joints in the arm and set the cframe of the arm yourself.

2 Likes

That way i will not be able to play animations involving hands, but still thanks for trying to help me

1 Like

Wouldn’t you able to make it work by overwriting the transform that’s normally applied? And replicating changes to every client every frame is what normal animations do, after all

1 Like

So i got this to work and it works fine but it looks glitchy:
https://gyazo.com/f99aebdf1606588ba0312cae03fafd58

Here is the code:

-- local script
local plr = game:GetService("Players").LocalPlayer
local run = game:GetService("RunService")
local remote = game:GetService("ReplicatedStorage")
local camera = game.Workspace.CurrentCamera

task.wait(5)

run.RenderStepped:Connect(function()
	remote.TiltAt:FireServer(math.asin(camera.CFrame.LookVector.y))
end)

local rotation = {} -- motor6d = cf

run.Stepped:Connect(function(dt)
	for joint : Motor6D, cf in pairs(rotation) do
		joint.Transform = cf
	end
end)

remote.RotateArm.OnClientEvent:Connect(function(joint : Motor6D, cf : CFrame)
	rotation[joint] = cf
end)
-- server script
local remote = game:GetService("ReplicatedStorage")

remote.TiltAt.OnServerEvent:Connect(function(player, theta)
	local char = player.Character or player.CharacterAdded:Wait()
	local rShoulder = char.RightUpperArm.RightShoulder
	local lShoulder = char.LeftUpperArm.LeftShoulder
	local sensitivity = 1
	local angle = CFrame.fromEulerAnglesYXZ(theta * sensitivity, 0, 0)
	
	remote.RotateArm:FireAllClients(rShoulder, angle)
	remote.RotateArm:FireAllClients(lShoulder, angle)
end)

This is not what i wanted but at least it WORKS and im just tierd at this point, if someone has a better idea please help me. Thank you Bilon for your help.

1 Like

Im still trying to make it work with C0 but im having the same problem, is this a bug? I cant submit a bug report because im not “Regular” yet.

1 Like

FINALLY, after 12 days i found the solution, i just need to disable workspace.Retargeting like this (in a server script):

game.Workspace.Retargeting = Enum.AnimatorRetargetingMode.Disabled

I dont have a clue why it works, but im happy that i found it!

6 Likes

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