Jumping Animation Wont Play Once It Hits The Water

I am trying to make it so when the character jumps above the water this animation plays and when they hit the water again it still plays the full animation then goes back to the regular swimming animation until they jump again if that makes since. But when I try it, it stops once the character hits the water again. Not sure how to fix this.
Also should I have loop on for this


1 Like

Can we see the code that you had for this?

1 Like

I actually don’t have a code for it, I am quite new to all this and trying to learn. I didn’t know for sure if a code was needed or not because all my other animations worked without. But given its more the just basic jumping that makes since. How would I go about coding for this if that’s not to large of a question? Anything advice helps, thanks.

1 Like

It’s absolutely going to need programming, and I don’t recommend enabling looping.

I’ll offer a method for the code but I don’t have the time to write out the code right now, so someone else may generously do that if they wish.
I’m not too familiar with terrain functions/events but I reckon you could implement some logic connected to a StateChanged (or similar) event, where it would save and compare the last humanoid’s state with the current one, in this case, it would compare the Swimming and Jumping states to determine if they exited the water while previously swimming.
In the event that doesn’t work (because StateChanged is infamously unreliable,) combing the answer to this post along with custom detection for leaving water should provide you with what you’re looking for.

Again, my apologies for not being able to give you the code itself. I may be able to throw something together tomorrow if no one else provides a solution (or you don’t craft one together)

Ill keep looking and take the advice you’ve provided me. Id be very grateful if your able to help me figure out a code whenever your able that would be a huge help! Thanks