When i kill someone with my plane only i see them die and on their screen they're still alive

Plane.rbxm (56.9 KB)
How can I make it so that when I shoot someone with my plane they die on both clients

When I shoot at them (using F while flying) they die on my screen but stay alive on theirs. That player stays invisible for me until that player dies or resets.

The script itself isn’t mine I took it from a different plane with had the same problem. I’ve searched for other scripts but couldn’t find one I liked or worked.

1 Like

Its because you have to kill the player on the server. You can do this using remote events

1 Like

Im guessing this is in a localscript, which means that you can only change the client, not the server. Use a Regular Script to change server data

1 Like

I tried using a normal script and the plane doesn’t fly at all?

1 Like

On a local script, detect their input such as WASD using userinputservice (which I suspect you have already done so no worries with this part). Then, use a remote event, which allows you send messages from the local script to the server. In the remote event, tell a server script what key the player presses. Then move the plane and detect hit and death in the server script.

You must understand that if you want anyone else to see what you do, it must be done on the server using a server script. If you do it on the client through a local script, only you will see it while others will not. To run on the server, fire a message to the server using a remote event.

I would highly recommend the Developer Hub article on Remote Events to solve the problem.

Also note that input detection such as the ‘F’ key press can only be detected on the client (a local script), so you must start with detection on the local script before transferring to the server the information.

3 Likes

You input from a local script and do the killing in the server script

2 Likes

and how does the script look like there are different scripts on the page