The camera is cloned and welded with motor6D to the player character using a server script, it’s also parented to the player character
The animation is played using a Local Script, by loading it to the player’s Animator in the humanoid, and then playing it using :Play()
The server script :
function onEquip(Player)
local camera = camera_object:Clone()
local character = workspace:WaitForChild(Player.Name)
local motor_weld = Instance.new("Motor6D")
-----------------------------------------------------
camera.Parent = character
motor_weld.Part0 = character['Right Arm']
motor_weld.Part1 = camera.Main
motor_weld.C0 = offset
motor_weld.Parent = camera.Main
end
The local animation script, is just your basic play animation script
Apparently pushing the other player makes it replicate properly, so i thought, maybe roblox is being stupid and not automatically setting the network ownership, so i tried doing just that,
Motor6Ds have been troubling for many developers as sometimes animations don’t load properly or don’t replicate to the server. I personally have this issue, my gun kit doesn’t always replicate the M6s animations and ive seen a bunch of posts about it in the DevForum.
If anyone knows why this is happening, if it’s something in Roblox or if it is a flaw in our code they will probably comment, but I wanna let you know that you’re not the only person.
So i guess it’s highly likely that this could just be a roblox bug?
If that’s the case, I’m glad that it’s not because i missed something, still kind of a bummer tho
Yeah, reading through some topics and refreshing my mind, apparently it still is a Roblox glitch, people have tried to go around it but no one has found a solution. You pretty much just gotta “pray” it works.
A workaround that I found that you can use it to send to all clients that this player equipped the camera and on the client check if the camera and motor6d ~= nil then disable the motor6d then enable it back and it replicates normally.