Please help - Is valid node not working

This is incredibly frustrating, any help would be seriously appreciated right now.

The problem:
I have two events below. The first event calls the second event.

The client says the variable is valid, however upon being given to the server, the server thinks the variable is not valid. Why is this happening? CurrentInteractable is just a BP actor in the level.

The events work perfectly on the server, this problem only occurs on the client.

Below is what happens ingame.

Current Interactable is set as a replicated variable, but replicated variables only replicate from Server to Client, never from Client to Server. Wherever you are setting Current Interactable on the client, change that code to do an RPC to set it on the Server instead. Then it will replicate from the Server back to the Client automatically.

The pattern to follow is use an RPC (Run at Server) to pass something from the Client to the Server and then use a replicated variable to pass a value from the Server back to the Client.

Thanks for the help, however I have updated my code to use this Server RPC to set the CurrentInteractable and I still have the same problem where the server claims the CurrentInteractable is NULL.

Do you know any other reason why this could be happening?
Thank you :slight_smile:

122495-capture.png

I’ve solved the problem - it was a very hard to debug error. CurrentInteractable gets set to null when the player isn’t looking at an interactable. Once I removed the node that sets it to NULL,everything worked. My theory is that setting the blueprint to null somehow broke the replication on the variable :stuck_out_tongue: (Setting variables to null in BP probably isn’t good practice anyways, since I used a hacky solution to do it and it throws a warning)