Why is my Stun Checker giving me issues?

So, for the most part my stun works. but when I want to add in a personal hit stun whilst you use a move/doing a combo the WalkSpeed isn’t lowered.

RS.Heartbeat:Connect(function()
	
	
	
	if Character:GetAttribute("IsBlocking") == true then
		
		Character.Humanoid.WalkSpeed = blockin
		
	end
	
	if Character.Effects:FindFirstChild("Stun") and Character:GetAttribute("IsBlocking") == false then
		
		Character.Humanoid.WalkSpeed = 2
		Character.Humanoid.JumpPower = 0
	
	end
	
	
	if Character.Effects:FindFirstChild("Busy") then
		print(Character.Humanoid.WalkSpeed)
		
		Character.Humanoid.WalkSpeed = 2
		
		
	end
	
		
		
		
	if Character.Effects:FindFirstChild("GuardBroken") and Character:GetAttribute("IsBlocking") == false then
			Character.Humanoid.WalkSpeed = 0
			Character.Humanoid.JumpPower = 0
		
	else
		if not Character.Effects:FindFirstChild("Stun") or Character.Effects:FindFirstChild("Busy") or Character.Effects:FindFirstChild("GuardBroken") and Character:GetAttribute("Running") == false  and Character:GetAttribute("IsBlocking") == false then

			Character.Humanoid.WalkSpeed = 13
			Character.Humanoid.JumpPower = 50.125
		end
	end
end)

Busy actually does exist within the character’s effects folder, so the reason that walkspeed isn’t changing is confusing me.
image
It only prints when the Busy in found, so I don’t know why the walkspeed is getting changed along with it.

Try changing all or statements on the bottom if not statement, you are updating the speed but you are immediately resetting it back to 13 from the bad if statement request.


RS.Heartbeat:Connect(function()
	
	
	
	if Character:GetAttribute("IsBlocking") == true then
		Character.Humanoid.WalkSpeed = blockin
	end
	
	if Character.Effects:FindFirstChild("Stun") and Character:GetAttribute("IsBlocking") == false then
		Character.Humanoid.WalkSpeed = 2
		Character.Humanoid.JumpPower = 0
	end
	
	
	if Character.Effects:FindFirstChild("Busy") and Character:GetAttribute("IsBlocking") == false then
		Character.Humanoid.WalkSpeed = 2
	end
	
		
		
		
	if Character.Effects:FindFirstChild("GuardBroken") and Character:GetAttribute("IsBlocking") == false then
			Character.Humanoid.WalkSpeed = 0
			Character.Humanoid.JumpPower = 0
		
	end
	
	if not Character.Effects:FindFirstChild("Stun") then
		Character.Humanoid.WalkSpeed = 13
		Character.Humanoid.JumpPower = 50.124
	end
	
	if not Character.Effects:FindFirstChild("Busy") then
		Character.Humanoid.WalkSpeed = 13
		Character.Humanoid.JumpPower = 50.124
	end
	
	if not Character.Effects:FindFirstChild("GuardBroken") then
		Character.Humanoid.WalkSpeed = 13
		Character.Humanoid.JumpPower = 50.124
	end
	
end)

I tried changing it, but it seems to still have the same issue.

RS.Heartbeat:Connect(function()
	
	
	
	if Character:GetAttribute("IsBlocking") == true then
		
		Character.Humanoid.WalkSpeed = blockin
		
	end
	
	if Character.Effects:FindFirstChild("Stun") and Character:GetAttribute("IsBlocking") == false then
		
		Character.Humanoid.WalkSpeed = 2
		Character.Humanoid.JumpPower = 0
	
	end
	
	
	if Character.Effects:FindFirstChild("Busy") then
		print(Character.Humanoid.WalkSpeed)
		
		Character.Humanoid.WalkSpeed = 2
		
		
	end
	
		
		
		
	if Character.Effects:FindFirstChild("GuardBroken") and Character:GetAttribute("IsBlocking") == false then
			Character.Humanoid.WalkSpeed = 0
			Character.Humanoid.JumpPower = 0
		
	else
		if not Character.Effects:FindFirstChild("Stun") and not Character.Effects:FindFirstChild("Busy") and not Character.Effects:FindFirstChild("GuardBroken") and Character:GetAttribute("Running") == false  and Character:GetAttribute("IsBlocking") == false then

			Character.Humanoid.WalkSpeed = 13
			Character.Humanoid.JumpPower = 50.125
		end
	end
end)

Like this?