Blueprint for a slide/crouch mecanic

I would like that the slide mecanic to work only when my character is moving and when is not moving he just crouch. How can I fix that pleaaase