Touched Event not working with client-sided parts

Hello, I’m trying to spawn a ball for every client, but not on the server. The ball should emit an impact particle once it collides with something (using Touched Event), but only when its velocity magnitude exceeds 5. Therefore i am creating the ball on each client and handling the collision event separately for each player. However, the issue is that when the ball collides with parts of the map, the collision is not replicated to other players—only when the collision happens between the ball and another player, which is strange.
I also tried creating the ball on the server while handling the collision event on the client, but the problem persists.

This is an example of the workflow:

1 Like

This isn’t really explained all that well.
Can you show some code or try to explain it a little better?

1 Like

Some clarification would be helpful in terms of what your goal here is - is the ball supposed to be the same for each client i.e. same position and velocity?

Because right now your system, the way you describe it is creating local parts that wouldnt have anyway of replicating to any other players - but it’s not clear what it is exactly that you want to replicate

Edit - wasnt trying to reply to you @Zerin107

1 Like

My bad, here is a better visual example.

First i have a script on ServerScriptService that spawns a the ball.
image

Then i have a local script on StarterCharacterScripts that waits for the ball to spawn and connects the touched event wich once touched, it prints what touched the ball.
image

If you test this out, you will see that the colision only works when your character touches the ball or sometimes works with the map parts but only if u are close.

You can see in the video that sometimes the collisions works but u have to touch it before with your player or stay near it.

However, if i add the Touched event both on the server and client, they seem synced and working as expected.
I don’t know why it doesn’t work properly by just having the detection on the client.

Well yeah? In this circumstance, the player owns the network ownership of the part so it is the one calculating the physics, and if it’s not close the client isn’t gonna bother.

But why does the player owns the network ownership if the part is created by the server and it’s not inside it’s character? Also it seems that you are right about the ownership.

According to the diagram the players create the ball? So I’m a little confused here.

Yes but as i mentioned in the start of the post, i was trying to make the ball on the server and connect the touched from the client. When i do everything from the client, works the same way.

I mean there is a function setNetworkOwner() that can just force the network owner to be the server.

I know but sadly it works the same as the two methods i mentioned.

this is because while you are using the server, it won’t register.
If you made a script that moves the ball to touch the part instead of moving it on the server manually, i believe it should work.