How to set network owner with local script (without remote events)?

I am making a plane game and i want shoot bullets from the plane with local script.

Any ideas?

[Sorry for bad English]

You can not.
Network Ownership api can’t be never called with local script.
You must call it in server script.

1 Like

But what is the best way to solve my problem then?

The only way is to use remote events. Anything the client creates is only to the client, and not known for the server. Therefore, you must tell the server to create the bullets for the client, to then be owned by the client (network ownership).

There are a lot of ways to do this. You’re basically just making a networked gun.

If you want to do it the simple way just send a remote event to the server with the time, position, direction of the bullet, and velocity of the plane and create the bullet on the server (or have the server do the raycasting and then send data to all the other clients besides the original for visualization).

If you want to do it a more complicated way you might want to research how FPS games make their bullets work well with networking limitations.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.