Motor6Ds breaking when set from server side

when setting the motor6ds on a server script, the character appears normal on the server but breaks on the client.

How do i fix this?

Code:

function MainModule.ScaleCharacter(char:Model,scale)
	local Vector = Vector3.new(scale, scale, scale)
	local Motors = {}
	table.insert(Motors, char.HumanoidRootPart.RootJoint)
	for i,Motor in pairs(char.Torso:GetChildren()) do
		if Motor:IsA("Motor6D") == false then continue end
		table.insert(Motors, Motor)
	end
	for i,v in pairs(Motors) do
		v.C0 = CFrame.new((v.C0.Position * Vector)) * (v.C0 - v.C0.Position)
		v.C1 = CFrame.new((v.C1.Position * Vector)) * (v.C1 - v.C1.Position)
	end

	for i,Part in pairs(char:GetChildren()) do
		if Part:IsA("BasePart") == false then continue end
		Part.Size *= Vector
	end
	if char.Head.Mesh.MeshId ~= "" then
		char.Head.Mesh.Scale *= Vector
	end

	for i,Accessory in pairs(char:GetChildren()) do
		if Accessory:IsA("Accessory") == false then continue end

		Accessory.Handle.AccessoryWeld.C0 = CFrame.new((Accessory.Handle.AccessoryWeld.C0.Position * Vector)) * (Accessory.Handle.AccessoryWeld.C0 - Accessory.Handle.AccessoryWeld.C0.Position)
		Accessory.Handle.AccessoryWeld.C1 = CFrame.new((Accessory.Handle.AccessoryWeld.C1.Position * Vector)) * (Accessory.Handle.AccessoryWeld.C1 - Accessory.Handle.AccessoryWeld.C1.Position)
		Accessory.Handle:FindFirstChildOfClass("SpecialMesh").Scale *= Vector	
	end
end

when setted before the player spawns

it fixes

aka if you have default roblox R6 animation it wont break your code, custom animations will break it