Replicating viewmodel movement to server

Recently I found can issue with my weapon system, the issue is that local viewmodel movement doesn’t replicate to server and to other user the fighting seems unrealistic. I’m trying to figure out how to replicate the client movement to the server one, I haven’t found any fix yet…

heres a video showing the problem:

Uping this post so its seen again


There’s not enough information for me to know exactly how you’re making the viewport follow the camera, but I’m guessing you manipulated the C0 joints of the character. In my game, when I needed to replicate head movement, I copied the C0 CFrames and sent them to the server. The server then passed them back down to the other clients.

Although the server doesn’t directly manipulate the joints, other clients will be able to see the movement. This approach requires using UnreliableEvent. While RemoteEvents can be used, I suggest UnreliableEvent because it can be less taxing on the server. Here’s an example of how the server script can look:

local characterValues = {}

local function onCharacterAdded(character)
    local targetCFrame ="CFrameValue", character)
    targetCFrame.Name = "targetCFrame"
    local headCFrame ="CFrameValue", character)
    headCFrame.Name = "headCFrame"
    local armsCFrame ="CFrameValue", character)
    armsCFrame.Name = "armsCFrame"
    characterValues[character] = {targetCFrame, headCFrame, armsCFrame}

        characterValues[character] = nil

local function onPlayerAdded(player)

-- So it works fine in Studio as well.
for _, player in pairs(game.Players:GetPlayers()) do


UnreliableEvent.OnServerEvent:Connect(function(player, targetCFrame, headCFrame, armsCFrame)
    if player.Character and characterValues[player.Character] then
        characterValues[player.Character][1].Value = targetCFrame -- UpperTorso Cf
        characterValues[player.Character][2].Value = headCFrame -- Head Cf
        characterValues[player.Character][3].Value = armsCFrame -- Arms Cf

I hope this helps you get closer to solving your issue. While my answer may not directly address your specific problem, I hope it provides enough information to give you a better understanding of what you can do and what is possible.