How do I make my character initiate a falling animation after running off a ledge or being hit off a ledge?

if there is a floor Is falling is false and if there is not a floor is falling is true