Client to server replication problem

Hello developers, Im dealing with a replication problem. My question is that if a client can create a part and replicate it to the server without using remote events, just like the :SetNetworkOwner.

I want to use the :SetNetworkOwner method to replicate it automatically, but it works when the part is created in the server. Is there any way to create a part in the client and automatically replicate it to the server?

Let me explain.
The :SetNetworkOwner method only works when the part is created in the server. I just want to create a part in the client and automatically replicate it to the server.

2 Likes

I don’t think this is possible without disabling FilteringEnabled.

2 Likes

To help avoid the XY Problem, why do you need a part created on the client to replicate to the server?

1 Like

For practical and security reasons, I think it would be best to use RemoteEvents and spawn your part(s) on the server.

2 Likes

Okay, my bad.

I want to make a pistol whose bullets are smooth and enough slow to see their movement fluidly.
To do that, I have a tool(the pistol) and I detect when the player activates it, then I clone the bullet and I
position it to the pistol of the player, after that, I use the :ApplyImpluse to the bullet in the direction which is the player aiming.

Okay, this procces has to be executed in the client because I need the bullet move smoothly, so if I do the :ApplyImpulse in the server side, the result will be laggy.

The problem is that if I execute it on the client of the player, only the player will see the bullet, so what I want to know is how to execute this process on all the clients by the best way possible.
I tried to send the information to a server script and then send it to all the clients in the server by a remote event but I think this is a complicated way. Maybe is a good one, but thats the point, I want to know which is the best way to do this, or at least a good one.

This would be the most reliable way to achieve what you’re doing.

Client A creates and simulates the bullet, tells the server that they fired their gun, server tells all other clients that client A fired their gun, and all other clients create the bullet and simulate it.

3 Likes

Really?
so I’m gonna give it a second try