Server sided arm movement [NOT SOLVED YET!]

Hello!
i had been searching in the Roblox documentation and Devforum for anything helpful, but i didnt find anything. this is a script which moves the local players head to the cframe of the camera…how would i do this with the right arm???

wait()
local tweenService = game:GetService("TweenService")

local Camera = workspace.CurrentCamera
local Player = game.Players.LocalPlayer

local Character = Player.Character
local Root = Character:WaitForChild("HumanoidRootPart")
local Neck = Character:FindFirstChild("Neck", true)
local YOffset = Neck.C0.Y
local Hum = Character:WaitForChild("Humanoid")
local IsR6 = (Hum.RigType.Value==0)

local Trso = (IsR6 and Character:WaitForChild("Torso")) or Character:WaitForChild("UpperTorso")

local Body = Player.Character or Player.CharacterAdded:wait()
local Head = Body:WaitForChild("Head")
local NeckOrgnC0 = Neck.C0

local CFNew, CFAng = CFrame.new, CFrame.Angles
local asin = math.asin
local Waist = (not IsR6 and Trso:WaitForChild("Waist"))

local Ang = CFrame.Angles	--[Storing these as variables so I dont have to type them out.]
local aSin = math.asin
local aTan = math.atan

local WaistOrgnC0 = (not IsR6 and Waist.C0)

local UpdateSpeed = 0.5
local HeadHorFactor = 1
local HeadVertFactor = 1
local BodyHorFactor = 0.9
local BodyVertFactor = 0.4
local Waist = (not IsR6 and Trso:WaitForChild("Waist"))

game:GetService("RunService").RenderStepped:Connect(function()
	local TrsoLV = Trso.CFrame.lookVector
	local HdPos = Head.CFrame.p
	local CamCF = game.Workspace.CurrentCamera.CoordinateFrame
	if Neck then
		local Dist = (Head.CFrame.p-CamCF.p).magnitude
		local Diff = Head.CFrame.Y-CamCF.Y
		if Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
			Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aSin(Diff/Dist)*HeadVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
			if script["Waist Movement R15 Only"].Value == true and not IsR6 then
				Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang((aSin(Diff/Dist)*BodyVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
			end			
		elseif Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
			Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aSin(Diff/Dist)*HeadVertFactor), 0, -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor),UpdateSpeed/2)		
		end
    end
end)

game.ReplicatedStorage.Look.OnClientEvent:Connect(function(otherPlayer, neckCFrame)
	local Neck = otherPlayer.Character:FindFirstChild("Neck", true)
	
	if Neck then
		tweenService:Create(Neck, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), {C0 = neckCFrame}):Play()
	end
end)
if not game:GetService("RunService").IsStudio then
end
while wait(script["UpDate Speed"].Value) do
	game.ReplicatedStorage.Look:FireServer(Neck.C0)
end
1 Like

Just change it to Head.

i already tried it, but it didnt work
it was like inversed

1 Like

Try CFrame:Inverse() If you’re using that, it’s pretty helpful.

Any example? It would be really helpful!

1 Like

What is CFrame:Inverse()? - Help and Feedback / Scripting Support - DevForum | Roblox

Uh oof i dont get the point of it

1 Like

Oof, I don’t think you can do this, which is a shame as it would be really cool.
The thing is, a character’s arms, legs and torso are parts, but the head is a mesh. If it was a part, you could just change its CFrame, but since it’s a mesh, the only way to change its position is by changing the position of the “Neck” part, which is parented to the head.
But I don’t think you can change the position of the “Neck” part on the server, or at least, I’m not sure how you’d do it. The only way I know of is to change the position of the “RootPart” of the character, and that’s not going to work, because then the whole character would move.
I think you’re going to have to give up on this idea and find another way to do it. Maybe you could just change the position of the camera on the server instead.