Animations issues (after apply HumanoidDescription system)

Hi!
I am making a game with morph system, I am using Humanoid Description system.
Inside CharacterAdded, I use this system, and everything works fine.
But later, in-game, when I try to use once more (like change animations, bodyparts etc…), there is lets say 50% of chance, that animations (walk, jump, attack) will be not replicating to other clients.
By my side everything works fine.
It is doenst matter which animations (from roblox catalog or my attacks animations)
Code (this works ok):

	local function onCharacterAdded(character)
		print(player.Name.." - Character loading - BEGIN")
		local character = player.Character or player.CharacterAdded:Wait()
		local characterModel = game.Workspace:WaitForChild(player.Name)
		local humanoid = character:WaitForChild("Humanoid")
		
		if not humanoid:FindFirstChildOfClass("Animator") then
			local animator = Instance.new("Animator", humanoid)
			animator = nil
		end
		
		local dClone = humanoid:GetAppliedDescription()		
		dClone.Torso = 2535560741
		dClone.LeftArm = 2535610626
		dClone.RightArm = 2535612534
		dClone.LeftLeg = 2535556975
		dClone.RightLeg = 2535558708

		--dClone.BackAccessory = "6065525652" -- Cyber Bag
		--dClone.FaceAccessory = ""
		dClone.FrontAccessory = ""
		--dClone.HairAccessory = ""
		--dClone.HatAccessory = ""
		dClone.NeckAccessory = ""
		dClone.ShouldersAccessory = ""
		dClone.WaistAccessory = ""

		dClone.ClimbAnimation = 2510230574
		dClone.FallAnimation = 2510233257
		dClone.IdleAnimation = 2510235063
		dClone.JumpAnimation = 2510236649
		dClone.RunAnimation = 2510238627
		dClone.SwimAnimation = 2510240941
		dClone.WalkAnimation = 2510242378
		wait()
		humanoid:ApplyDescription(dClone)

and now, after touch a part I use this (after apply, animations are not replicated, chance 50%):

local function onTouch(hit, object, player)

	local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
	local bossStatus = player.PlayerStatus:FindFirstChild("BossStatus")

	print(player.Name.." is now an Ancient Avatar - "..object.Name)

	humanoid.WalkSpeed = 0
	humanoid.JumpPower = 0
	local effectFire = game.ServerStorage.Effects.CollectFire:Clone()
	effectFire.Parent = object
	effectFire.Enabled = true
	
	if not humanoid:FindFirstChildOfClass("Animator") then
		local animator = Instance.new("Animator", humanoid)
		animator = nil
	end
	
	wait(0.5) 

	local dClone = humanoid:GetAppliedDescription()
	dClone.BodyTypeScale = 1
	dClone.DepthScale = bossSize
	dClone.HeadScale = bossSize
	dClone.HeightScale = bossSize
	dClone.ProportionScale = 1
	dClone.WidthScale = bossSize
		
		dClone.Face = 0	
		dClone.Torso = 4822250259
		dClone.Head = 4822251526
		dClone.LeftArm = 4822245102
		dClone.RightArm = 4822247613
		dClone.LeftLeg = 4822246399
		dClone.RightLeg = 4822248936

		dClone.BackAccessory = ""
		dClone.FaceAccessory = ""
		dClone.FrontAccessory = ""
		dClone.HairAccessory = ""
		dClone.HatAccessory = ""
		dClone.NeckAccessory = ""
		dClone.ShouldersAccessory = ""
		dClone.WaistAccessory = ""

		dClone.ClimbAnimation = 2510230574
		dClone.FallAnimation = 2510233257
		dClone.IdleAnimation = 2510235063
		dClone.JumpAnimation = 2510236649
		dClone.RunAnimation = 2510238627
		dClone.SwimAnimation = 2510240941
		dClone.WalkAnimation = 2510242378

	wait(0.5)
	humanoid:ApplyDescription(dClone)
	wait()
	
	bossStatus.Value = true
	humanoid.WalkSpeed = 22
	humanoid.JumpPower = 70
	
	effectFire.Enabled = false
	wait(1)
	effectFire:Destroy()
	object.Transparency = 1
	
	-- clean
	humanoid = nil
	bossStatus = nil
	effectFire = nil
	dClone = nil
	
	wait(bossRespawnTime)
	object.Transparency = 0
end
1 Like