In multiplayer client can't open door but the server can

When the server press F the door opens and updates to the client, when the client presses F the door doesn’t open. Is this to do with the player controller ?

How would I call a replicated server function

The input needs to call a replicated server function to tell the server that the client wants to open the door. The way you have that scripted, you are calling the Play event which only lives on the server.

Take a custom event say run on server and then check for authority to know if you have to call the server event or just open the door normally.

Create a function that does what the F input set of nodes does. Mark it as replicated to server. Then have the F key call that function instead

Still Doesn’t work :confused:

I prombem too. Screen please.

Thank :slight_smile:

Sorry, I said function but really meant a custom event. You don’t need to check authority though

I know this topic is about a year old but can someone chime in on how to do this? I am stuck on the same thing. I can get the doors to all work and synchronized for multiplayer but just using the trigger boxes, but as soon as you try to use a input key only the server can use the door. This topic has been discussed lots of places but no one has posted a clear way to accomplish this, and this should be an easy task to do… I have been working on getting this working for around 6 months, searching and reading all the documentation and nowhere tells you how to for sure do this.

So far the only way I could get this to work with everyone seeing the doors opening and closing was to create my own controller as suggested here in the forums but this just seems just way to much wasted work, if this is the only way to do it then the work wont be wasted. Is that the only way to achieve this or has anyone been able to do this using the default 3rd person template and player controller.

but as soon as you try to use a input key only the server can use the door

You have to tell the server about the input, since there’s no way for it to know a user pressed a key on a different machine without that. For example, you’d have to bind the key to a function that calls ServerOpenDoor (the function that opens the door). The server then can check whether the call was valid, open the door, and then all other clients would get the replicated state.

I swear I have tried this many times that way, when I get some time later I will post my code, screen shots. Thanks for the fast reply.

Make sure your input and client/server functions are on the player controller. It needs to be owned by the remote client

i have the same issue and can figure it out for 3 days now. any ideas?