Have a clone mimic the joint offsets of a player (i.e. mimic the players animation)

Hi, I’m trying to have a clone mimic the animations of a player (client sided). Here’s my current attempt with Motor6Ds:

task:give(main.RunService.RenderStepped:Connect(function()
	for _, clone in pairs(playerClones) do
		for _, motorToCopy in pairs(targetPlayerMotors) do
			if motorToCopy.Parent ~= nil then
				print("Mimic motor (1): ", motorToCopy.Name)
				local motor = clone:FindFirstChild(motorToCopy.Name, true)
				if motor then
					print("Mimic motor (2): ", motorToCopy.Name)
					--motor.C0 = motorToCopy.C0
					--motor.C1 = motorToCopy.C1
					motor:SetDesiredAngle(motorToCopy.CurrentAngle)
				end
			end
		end
	end
end))

(Result: nothing happens, same when setting DesiredAngle, C1 and C2)

This was a bit of a pot shot since I don’t actually know much about Motor6Ds. Can any small tweaks fix this, or do I need to approach this different entirely?

1 Like

Update

Solved by doing motor.Transform = motorToCopy.Transform and using Stepped instead of RenderStepped. Thanks GunsBullets and sircfenner for the solution.

1 Like