I want to make a roll animation only when character comes to the ground. Without any bugs, have in mind that I can touch not only floor, but a wall too.
ThIs iS NoT a reQuesT SitE
Anyways, Humanoids have an event called .StateChanged
which fires when, well, its state changes. This can be many things, from jumping, to falling, to walking, and also landing.
We can work with this given the parameters of .StateChanged
--StarterCharacterScripts local char = script.Parent; local humanoid = char:WaitForChild("Humanoid") --Waits until the humanoid loads humanoid.StateChanged:Connect(function(oldState, newState) --We have the old and new state if newState == Enum.HumanoidStateType.Landed then --If we landed... --play your animation here end end)