local Humanoid = game.Workspace:WaitForChild("Red Nosed Seal").Humanoid Humanoid.StateChanged:connect(function(old,new) print(old .. " " .. new) if new == (1) then -- (A) --code Humanoid.Jump = true end end) Some help?
I've tried this but it gives the error of this http://prntscr.com/gf2xcp
You would use the Enum
HumanoidStateType
followed by GetState()
, as described here and here. Example:
local h = script.Parent:FindFirstChildOfClass("Humanoid") --wherever the humanoid is if h:GetState() == Enum.HumanoidStateType.Freefall then --if its falling print("Falling") --print falling end
or
local h = script.Parent:FindFirstChildOfClass("Humanoid") h.StateChanged:Connect(function(state) if state == Enum.HumanoidStateType.Freefall then print("Falling") end end)
This was written from scratch so I apologize if this didn't work. Please accept my answer if this helped!