So i have a problem with humanoidChangeState for my dummy after it got unweld the ChangeState seem to be broken

Humanoid:ChangeState() Problem after Unwelding the Dummy

  1. What do you want to achieve? Keep it simple and clear!
    i want to know how to fix this problem

  2. What is the issue? Include screenshots / videos if possible!
    My Dummy Cannot Change state anymore after it got Weld and Unweld (For carry system)
    StateChange problem

  3. What solutions have you tried so far?
    i tried doing the carry system without weld but thats awfully weird so i decide to ask if there is anyway to fix this? and yes i tried search up but no answer found

sorry if this is not a Category for it the code work fine but incase if anyone want to know how i use the changeState i will put my code here

-- 
local char = script.Parent
local UIS = game:GetService("UserInputService")
local hum : Humanoid = char:WaitForChild("Humanoid")
local Knocked = char.Humanoid.Knocked
local Recovered = char.Humanoid.Recovered
local Hehe
local Noob 
local Pro
local DA = false
while task.wait() do
	
	print(Noob)
	print(Pro)
	local val = hum:GetState() == Enum.HumanoidStateType.Ragdoll and true or false
	local state = val and Enum.HumanoidStateType.GettingUp or Enum.HumanoidStateType.Ragdoll				
	if  char:FindFirstChild("Knocked") and Knocked.Value == false and Recovered.Value == true then				
		Knocked.Value = true
		Recovered.Value = false
		for _,v in pairs(Enum.HumanoidStateType:GetEnumItems()) do 
			if v ~= Enum.HumanoidStateType.Ragdoll and v ~= Enum.HumanoidStateType.None then 
				hum:SetStateEnabled(v,val)				
				Hehe = v
				Noob = val
				
				
			end
		end

		task.wait(0.1)
		hum:ChangeState(state)
		Pro = state
	elseif char:FindFirstChild("Knocked") == nil and Knocked.Value == true and Recovered.Value == false or char:FindFirstChild("Gripping") then	
		print("Standing getting carry")
		Recovered.Value = true
		Knocked.Value = false
		for _,v in pairs(Enum.HumanoidStateType:GetEnumItems()) do 
			if v ~= Enum.HumanoidStateType.Ragdoll and v ~= Enum.HumanoidStateType.None then 
				hum:SetStateEnabled(v,val)
				Hehe = v
				Noob = val
				
			end
		end
		hum:ChangeState(state)
         Pro = state
	end	
	
	task.wait()
	
end


i just want to know if anyone got the same problem and how to solve this? everything work fine until the Humanoid got weld and unweld