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
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:
Character copy on the right and actual player on the left:
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 , sorry for bad english
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)
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
-- 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.