--			elseif state == "Dead" then
--				wait(.4)
--				animations[state]:AdjustSpeed(0)

			end
			animations[state]:Play()

		end
	end
end

while true do
	game:GetService("RunService").Stepped:wait()
	if humanoid.Health > 0 then
		if Grounded() then
			local speed = Vector3.new(character.HumanoidRootPart.Velocity.X, 0, character.HumanoidRootPart.Velocity.Z).magnitude
			if speed > 1 then
				ChangeState("Walk")
			else
				ChangeState("Idle")
			end
		else
			local ySpeed = character.HumanoidRootPart.Velocity.Y
			if ySpeed > 0 then
				ChangeState("Jump")
			else
				ChangeState("Fall")
			end
		end
	else
		--ChangeState("Dead")
	end
end
