Set int doesn't work

Hey, im making a game where you have two players and both are able to double jump, I made an integer for both of them that keeps track of how many times the character has jumped and it resets when they hit the ground. I made a onhit event when it hits the ground and checks which character that it hit with and triggers the landing event inside the character blueprint. It works fine with both characters and triggers the event properly, however it only sets the 1st player’s integer to 0 while the 2nd player is stuck at 2 making it unable to jump again. The script is identical on both characters, only with different variables.

This is the jump script from the character blueprint. I have a custom event for each of the players called Landed P1/P2 and it sets the integer back to 0. Just to check that the events actually triggered i have a print string after the set integer node. Both prints gets exectuted, but the P2 Jump does not get set while P1 does.

And this is the onhit which checks which character it hit and launches the event accordingly.

I hope someone is able to tell me what im doing wrong or atleast tell me why this is happening

Is your bool check for player 2 on the OnActorHit(map2) event returning true?

What is this event attached to? If player 2 is running this event player index 1 will refer to the other guy I think. Might be some confusion between player indexes.

Yes, both bool checks for P1 and P2 are returning true.

About the event you can see it in the first picture what it is attached too. Its the custom events that is setting the integer back to 0.