Hey @Elliottcoe!
You can easily do so with a collision enter/exit check that updates the variable for your animation. The tricky part is setting up your animation to match the stairs as they go up.
Here is a non Epic affiliated video that shows you how you can possibly pull this off:
I hope the above solution works for you!