I am trying to find the player’s statetype of running, so I can put there death at 0
--
game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function()
local player = game.Players.LocalPlayer
local Char = player.Character
local Humanoid = Char.Humanoid
if Humanoid:GetState() == Enum.HumanoidStateType.Running then
print("Player is running")
end
end)
No, that’s the correct way to get the HumanoidStateType, there are other ways though too. For example, the Humanoid.StateChanged event is fired whenever the humanoid’s state changes. The new state is passed to any function connected to the event.
The problem is that the server isn’t finding the state that the humanoid is in, i.e when I run my code, and start running, the print won’t go through, and I don’t have any errors.
You do have to use the statechanged function inherited from humanoid to acess the current HumanoidStateType I do believe. So @Limited_Unique did provide you with the correct information.