Opening a door not working

Hello there,
I’m having a small problem when opening a door.

I can rotate my door (open it) but it looks like some collision is not updated. Also, I can go through the Static Mesh, when it’s open.

Below there is a small video showing what’s happening.

Here’s the code:
Constructor:

	Scene = CreateDefaultSubobject<USceneComponent>(  TEXT("Scene"));
	StaticMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMesh"));
	
	SetRootComponent(Scene);
	StaticMesh->AttachToComponent(Scene, FAttachmentTransformRules::KeepRelativeTransform);

	StaticMesh->SetMobility(EComponentMobility::Movable);
	
	StaticMesh->SetCollisionObjectType(ECollisionChannel::ECC_WorldDynamic);
	StaticMesh->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_No;
	StaticMesh->SetCanEverAffectNavigation(true);

Code that opens/closes the door:

float LocalRotation = 0.f;

	if (WasUsed)
	{
		//StaticMesh->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
		LocalRotation = -90;

		UE_LOG(LogTemp, Warning, TEXT("Opened"))
	}
	else {
		//StaticMesh->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
		LocalRotation = 90;

		UE_LOG(LogTemp , Warning, TEXT("Closed"))
	}

	FRotator Rotator = StaticMesh->GetComponentRotation();	
	
	FRotator NewRotator = FRotator(Rotator.Roll, Rotator.Yaw + LocalRotation, Rotator.Pitch);

	StaticMesh->SetWorldRotation(NewRotator);

Is it a multiplayer project? Because it look exactly like a multiplayer project issue.

Yes, I’m doing it with multiplayer support.

You’re opening the door on client only, but not on the server.
Since the character location is replicated from server to client, you can’t go through in the first half of the video: the server character stays in place and so does the client character.
In the second half you server char goes through, and once its location no longer in conflict with the door that’s opened on the client side, the client char pops to the other side.

Solution: open the door both on the client and on the server side.

Yup, you’re right.

I was updating the Clients using a RepNotify and I totally forgot to update on the Server.

Thank you for your reply.