Check if player is walking

Hello!
I have a really simple question,

How do I check if a player is walking/idle?

I’ve searched but couldn’t find anything about it.
Thanks!

1 Like

Enum.HumanoidStateType

Please do some research before this, the following above keywords is already existed but in the developer.roblox.com

2 Likes

Alright, Thank you!

So would this work?

while Enum.HumanoidStateType == 8 do

script.Parent.Decal.Texture = “rbxassetid://5813744107”

wait(0.5)

script.Parent.Decal.Texture = “rbxassetid://5813736561”

wait(0.5)

script.Parent.Decal.Texture = “rbxassetid://5813744553”

wait(0.5)

script.Parent.Decal.Texture = “rbxassetid://5813736561”

wait(0.5)

end

  1. Please organize your code. I can’t understand well.

  2. Read this from the API Manual.

HumanoidStateType | Documentation - Roblox Creator Hub

Get the humanoids move direction and see if all the numbers equal 0.
Humanoid:MoveDirection

You could use the property Humanoid.Running or as ItzMeZeus said; Enum.HumanoidStateType

And check it’s speed like the following script I have provided for you:

humanoid.Running:Connect(function(speed)
   if speed > 0 then
   --code
    else   
  end 
end)
4 Likes

You should use task.wait + you should probably work on a better way to sort out these lines. Maybe a loop?