I'm trying to make it so that when you're in first person (you're always in first person) that when you equip this tool, your arms follow your cursor. Since I want it the joints to update on the server so that other players can see where my arms are pointing, it needs to update on the server. But I have to run it through a localscript because I need to use the camera for this. Since this is going to be done with all tools, I'm using a module for the function. Here are the functions in the module:

it works fine on the client, but it STILL won't update on the server:

Module script: local runservice = game:GetService("RunService")

local leftShoulder local rightShoulder local cam

local function armsLoop() leftShoulder.C0 = CFrame.new(leftShoulder.C0.p) * CFrame.Angles(cam.CoordinateFrame.lookVector.Y + math.rad(90), -math.rad(90),0) rightShoulder.C0 = CFrame.new(rightShoulder.C0.p) * CFrame.Angles(cam.CoordinateFrame.lookVector.Y + math.rad(90), math.rad(90),0) end

function joints:ArmsMoving(torso, camera, move) cam = camera leftShoulder = torso["Left Shoulder"] rightShoulder = torso["Right Shoulder"]

if move then
	runservice:BindToRenderStep("ArmsLooping", Enum.RenderPriority.Camera.Value-1, armsLoop)
else
	runservice:UnbindFromRenderStep("ArmsLooping")
	
	leftShoulder.C0 = CFrame.new(leftShoulder.C0.p) * CFrame.Angles(0, -math.rad(90),0)
	rightShoulder.C0 = CFrame.new(rightShoulder.C0.p) * CFrame.Angles(0, math.rad(90),0)
end

end

Local script: ReturnJoints.OnClientInvoke = function(move) if move then JointModule:ArmsMoving(char.Torso, camera, true) else JointModule:ArmsMoving(char.Torso, camera, false) end print('left shoulder - '..tostring(leftShoulder.C0)) print('right shoulder - '..tostring(rightShoulder.C0)) return leftShoulder.C0, rightShoulder.C0 end

Server script: leftShoulder, rightShoulder = ReturnJoints:InvokeClient(player, true) --// MAKE ARMS MOVE print('left shoulder is '..tostring(leftShoulder)) print('right shoulder is '..tostring(rightShoulder)) char.Torso["Left Shoulder"].C0 = leftShoulder char.Torso["Right Shoulder"].C0 = rightShoulder

Server output: left shoulder is -1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0 right shoulder is 1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0

So the CFrames seem(?) to replicate but setting them won't work!

5 comments

0

Sorry for the messy post! It seems all of it didn't get posted as a snippet.

0

Turn on PrintFilters in Studio settings and see what it outputs.

0

http://prntscr.com/bdiw60 I get that spammed in local output and then in server output it didn't output anything related to this. My require()s for my private modules suddenly broke.

0

http://prntscr.com/bdj178 Ignore the stuff about modules, studio just logged me out. This is spammed in the local log, but nothing related to this in the server log.

0

Changes to the Character should indeed replicate to the server. I don't see anything wrong with the script either.