This is a script inside StarterCharacter, a normal script. I'm trying to print something but for some reason this script isn't working. Any ideas?
local Humanoid = script.Parent:WaitForChild("Humanoid") Humanoid.StateChanged:Connect(function(PreviousState, NewState) if NewState == Enum.HumanoidStateType.FallingDown then print("falling") elseif NewState == Enum.HumanoidStateType.Landed then print("landed") end end
local Humanoid = script.Parent:WaitForChild("Humanoid") local RunService = game:GetService("RunService") RunService.Heartbeat:Connect(function() if NewState == Enum.HumanoidStateType.FallingDown then print("falling") elseif NewState == Enum.HumanoidStateType.Landed then print("landed") end end)
honestly i think this would work
but if it doesnt maybe you should check if the falling animation is playing instead
I’ve edited it now, try this:
Instead of FallingDown
do Freefall
, which make should Line 4
look like:
if NewState == Enum.HumanoidStateType.Freefall then
Hopefully this works out for you :D