Network ownership and touched events

I’m experiencing very unreliable touched events when the player gets close to parts. In particular, I’m getting TouchEnded events while a part is still inside another part. Could someone explain why this is happening?

I’m aware that touched events are unreliable, and that it’s related to network ownership - I’d just like a deeper understanding.

I’ve attached a place file that demonstrates the problem using a force-field/conveyor type system. When you first start the server, the blocks flow smoothly through the force field part. If you then move to within 3 studs of the force field it starts receiving TouchEnded events too early, and you can see the blocks stop moving. At some point in the future, even though they are stationary, a Touched event is received and the parts start moving again.

TouchedProblem.rbxl (20.7 KB)

1 Like

I know this is old. Any workarounds for you? Experiencing the same issue

I don’t remember if I found a workaround, but I was just playing around with it now. I added a script that checks network ownership and sets server-owned parts to red and player-owned parts to green. You can see it starts to become unreliable as soon as network ownership of the blocks moves to the player.

I changed the conveyor script to force network ownership of the blocks to be the server, and it works reliably now. I guess for server performance, and for smoothness on the client, you should try to allow this to be done on the client as much as possible, and only force server ownership where absolutely necessary.

TouchedProblem 0.2.rbxl (28.5 KB)

1 Like