Client variable resets after a while?

Hello.

I’m creating a multiplayer shooter in which you have the ability to enter a car.
This is what I do:

-> linetrace in front of player and check if it hits the car.
-> cast to the car and set the car’s actor class variable (which is replicated) to self
-> possess the car

if I want to leave the car I just place the player (which I saved in the car’s actor class variable) next to my car.
but I’m getting errors when I try this if the player is in the car for more than 5 seconds. The actor doesn’t seem valid anylonger.

To check this I made this in my car blueprint.

at first both my client and server print : BP_Player
but after 5 seconds only my server displays it and my client prints nothing.

Sorry if my english isn’t that good, I hope you understand what I mean.

I hope somebody can help me.

You destroy character when you enter to car? If yes then actor cant be valid i think… you have problem with respawning player next to car? If yes then store somewhere changed variables and when you spawn that actor, override that variables imo. I think saving reference and using that reference for spawning pawn is not possible but im not sure.

I don’t destroy the actor, I make it invisible and disable the tick with SetActorTicksEnabled