# Problem with Double jump on Client

**URL:** <https://forums.unrealengine.com/t/problem-with-double-jump-on-client/70527>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [August 2, 2016, 9:59pm UTC](https://forums.unrealengine.com/t/problem-with-double-jump-on-client/70527 "2016-08-02T21:59:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RadiantWings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RadiantWings](https://forums.unrealengine.com/u/RadiantWings)\
**Post date:** [August 2, 2016, 9:59pm UTC](https://forums.unrealengine.com/t/problem-with-double-jump-on-client/70527/1 "2016-08-02T21:59:29Z")

</div>

Hey everyone, so I’ve been having this issue with my game and this double jump function I have. I intended for the double jump to allow for a mid air direction change depending on where you wanted to move. While the function works properly on the server, the client’s doesn’t work. I made the double jump function run on the Server already so I’m not sure what else to do. Can anyone help? I was thinking I could make a client side function that would get the client’s CharacterMovementComponent and then perform the modifications on the server, but I’m not entirely sure if that’s right.

BaseCharacter.cpp

```auto

void ABaseCharacter::DoubleJump_Implementation()
{
	// Get CharacterMovement component
	UCharacterMovementComponent* CharMovement = ABaseCharacter::GetCharacterMovement();
	bool check = CharMovement->IsFalling();
	// If the player is in the air and has not already double jumped...
	if (check && !(HasAirJumped) && !(IsDodging))
	{
	
			// kill the player's velocity
			CharMovement->Velocity = FVector(0.0, 0.0, 0.0);
			

			//PLACEHOLDER
			float forward_val = 1.0;
			float right_val = 1.0;
			// If the player is pressing any movement key
			if (forward_val != 0.0 || right_val != 0.0)
			{
				// get the current velocity
				FVector currvelocity = CharMovement->Velocity;
				// calculate the new velocity
				FVector additional_movement = (GetActorForwardVector() * DoubleJumpHeight * forward_val) + (GetActorRightVector() * DoubleJumpHeight * right_val);
				// set the player's new velocity
				CharMovement->Velocity = FVector(currvelocity.X + additional_movement.X, currvelocity.Y + additional_movement.Y, currvelocity.Z);
	
			}
			// if no keys are being pressed
			else
			{
				FVector currvelocity = CharMovement->Velocity;
				//CharMovement->Velocity = FVector(currvelocity.X, currvelocity.Y, currvelocity.Z + JumpHeight);
				// 2nd version: player loses all X and Y velocity
				CharMovement->Velocity = FVector(0.0, 0.0, currvelocity.Z);
			}
	}
}

bool ABaseCharacter::DoubleJump_Validate()
{
	return true;
}

```

I have this in the BaseCharacter.h

```auto

	UFUNCTION(Server, Reliable, WithValidation, BlueprintCallable, Category = "Jump")
		void DoubleJump();

```
