Client Posssess Problem

Hi, when the server try to possess a car it works but if the client try, it possess and unpossess instantly
here is the screenshot of the possess nodes blueprint

Thanks in advance

I try to replicate it but it says possess node error wheras nothing when not replicate

see that little symbol at the top right of the posses node. it means that that node can only be called on the server.

Oh yeah wow xD sorry i didin’t see that and how can make that the client use this node ( btw thank you for answering )

When the client try to possess the car the server possess it and not client xD sorry I m a replication beginner xD

im not the most experienced with this either but from what i understand on an abstract level you would have your client send a request to the server to posses the pawn, the server would then get a reference to the clients controller and execute the posses on the clients behalf. its kind of a tricky thing replication. essentially you want all things to occur on the server, clients just request for things to happen then do as the server tells them.

ok so i have something that may work. instead of using the get controller node you have try using the get instigator controller. i made a small script in the levelBP that seems to work. hope it helps start you in the right direction.

Thank You sooo much ThompsonN13 for your answers !

did it end up working?

I m using line trace to allow input interaction to be pressed so it s been few hours i m trying to adapt what you show from an overlap to line trace
I think that ill find in few time

thank you ! :smiley:

Are you looking to use a line trace to find a character that can be possessed. I may actually be able to help there too. I made a script awhile ago that when you press a button it creates a line trace forward and posses any enemy hit. i think your easily adapt it to your situation.

something like this…

Wow this is really weird … i can’t let target without connection in the possess node i think that this is how you can have to good controller but it says error for me if i connect nothing

228815-2.png

if the node isnt in a playercontroller blueprint you need to connect something there, either a get player controller or get instigator controller or some controller reference. the most recent image i posted was a script i made within the player controller. i made it there so that it didnt matter what type of character i was possessing i could still use that ability.

Oh ok nice thank you for these tips !

if i set the player index to 1 the client goes in car if i set it to 0 the server goes in car so how can i find the player index ?

I GOT IT WORK !!! by using get controller target is pawn as target in the possess node !!!
Thank you so much ThompsonN13 ! :smiley: