Enum.HumanoidStateType Is Running even when the Character is Idle

Satna Claus is on a mission! He wants to destroy everyone’s Christmas but unfortunately, there is one problem with him. His Animation is always seen as running which doesn’t help him at all! He doesn’t run away from his problems! Can you help him?

Picture of Dedicated Satna Claus

Side note: Please leave if you are my friend on Roblox. This might be a big spoiler to the Christmas Present I am making!


What is the Issue?
Well, Let me show you a video; And also my script and Explorer, Hope it might explain the problem!

Explorer

image

Script
Text Version
local Animation
script.Parent.StateChanged:Connect(function(StateType)

	if StateType == Enum.HumanoidStateType.Running then
		local Anim = Instance.new("Animation")
		Anim.AnimationId = "rbxassetid://7461277727"
		Animation = script.Parent:LoadAnimation(Anim)
		Animation:Play()
	elseif StateType == Enum.HumanoidStateType.None then
		local AnimIdle = Instance.new("Animation")
		AnimIdle.AnimationId = "rbxassetid://7515496958"
		local IdleAnim = script.Parent:WaitForChild("Animator"):LoadAnimation(AnimIdle)
		IdleAnim:Play()
	end
end)
Picture/Photo/Image Version

image


Video


Skip to 3:30 for a better quality video and a summary, most of it is just lag, sorry! :sad:


What solutions have you tried so far?
Did you look for solutions on the Developer Hub?
Yes, Did I find what I was looking for? No
Summary:
Why is it Considered Enum.HumanoidStateType.Running or Enum.HumanoidStateType.RunningNoPhysics When my character is Standing Idle? My Animations Work Completely Fine By The Way! :happy2: :

Satna Claus wants to Thank You! He is grateful for you help but he must get back to buissness and make evil presents! Sincerely ~ @oscoolerreborn & Satna Claus

-- Thank you!
1 Like

I know that StateChanged is a little wonky but another alternative to determine if the character is running is to use MoveDirection. For example:

Below is a local script in StarterGui:

local Player = game.Players.LocalPlayer; 

while wait() do -- You don't need to use a loop if u want, you can simply just call the below whenever needed.
	local Humanoid = Player.Character and Player.Character:FindFirstChild("Humanoid") -- Reference humanoid 
	if Humanoid then -- Just making sure the humanoid exist
		if Humanoid.MoveDirection ~= Vector3.new(0,0,0) then -- Check if the MoveDirection ~= 0
			-- Is running
			print("Running")
		else
			-- Is Idle
			print("Idle")
		end;
	end;
end;
1 Like

Thank you so much for your help! I will try this out! There is also

Humanoid.Running:Connect(function()

end)

And a lot more [ Swimming, Jumping…], Thanks for the help, also i never knew about MoveDirection :0 woah! It seems very cool, thx!

): Unfortunately, Humanoid.MoveDirection does not change and always stays at Vector3.new(0,0,0), Maybe its because i created the character myself, I am confused :sad:! Thanks for the help anyway, Do you know any other way? I tried Humanoid.Running, It has the same outcome as before! ~Welp~! AAAAA! Pleas help, :happy2:

Why not just by default when santa first spawns, have him in his idle position, whenever you need to move him via using :MoveTo() or if your cframing, then have the run animation play until he reaches his destination.

1 Like

Thats so smart thanxs so much, this is the solution to the problem but i’m not sure if I should mark this as solution bcs its not the answer to why Enum.HumanoidStateStype.Running comes when idle, hmmm… Ill mark it for now :happy4: ill ask roblox if they can fix it or seomthig, thxxx!