Ok so basically i have a button on my game. When the player clicks the button it then spawns the player and takes control of the pawn so that i can move around etc. The problem i have is this functionality only works on the server side and not the client side. It spawns the player ok but it doesn’t posses the player. i figured i could solve this problem by having a custom event that is replicated and then just getting the on clicked event to call this custom event from the widget but for some reason this is not possible? so how would i get it to work so that when i click the button on the widget it spawns and posesess on both the client and the server? or is the on clicked events in the widget set up wrong?? i noticed that the posess function though states it will only execute on the server so is this the problem ?? if so how would i get it to work on the client would i need some other module??
here is my widget events
Here is the server side image . as you can see after i have clicked the button it has spawned the character and i have taken control and can walk around etc
Now here is the view from the client side . as you can see it has spawned the second character, ( although for some reason it has spawned him with his feet in the ground which is wierd). But unlike the server version it hasnt taken control of the pawn and i am unable to move around or do anything
i think what i need to do is move all this code from the widget and have it in a custom event that is replicated in my level blueprint like this
so it will effectively do the same thing, but how would i get the widget to call this custom event when the button is pressed. or am i going about this all completely wrong
Hope you guys can help clear this up as im a complete noob to unreal
thanks for youre time