Is there a way to check and see if a player is walking in a localscript?
You can use the Running event to do this task for you and change a boolean every time it triggers.
Here's some code for you to inspect...
local humanoid = game.Players.LocalPlayer.Character.Humanoid local isRunning = false humanoid.Running:connect(function(speed) isRunning = speed ~= 0 end)
Yes, you can. The humanoid's Running
event can be used:
local Player = game.Players.LocalPlayer local Character = Player.Character local Humanoid = Character.Humanoid Humanoid.Running:connect(function(Walkspeed) print("Player has started walking! The walk speed is: "..Walkspeed.."!") end)
Use the Humanoid.Running event.
game.Players.LocalPlayer.Character.Humanoid.Running:connect(function() print("Player is walking") end)
Humanoids have a Running even which is fired whenever the speed of the character changes. Use that and some logic, and you have a way to tell if the player is walking or not.
local Walking = false game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Running:connect(function(Speed) Walking = (Speed > 0) end)