Touched Events not respecting Collision Filters

I was ecstatic to know that I could avoid unnecessarily firing touched events on client with the use of collision filtering, however upon attempting to integrate this feature into my game it doesn’t seem to work as intended. On the client i’m creating a touched event with tagged parts, which only have their collision filtered with 1 group. Then I’m setting the character’s collision group in a local script to be the one group that can collide with it. Enabling the property in workspace to respect collision filtering touched events, now the only touch event that should trigger it should be the local character, in the local script. Below is an example of what actually happens.

  • Below is an example part with the collision group for only the LocalPlayer

  • This is the server view(to showcase both player’s locations and the property within workspace to respect collision filtering for touched events)(Player 1 is within bounds and touched the part, while player 2 is unmoved)

  • This is the player1’s Perspective and output within the bounds of the part and showing it’s collision group(set locally with a local script)

  • This is player 2’s perspective and output showing player 1’s properties NOT set to the collision group to interact with the part. Yet being fired anyway.

image

Expected behavior

What is meant to happen here is the Touched Event was only meant to fire for player1 (the player who actually touched the part with the respective Collision group, which is set only for the local player’s character) however, the other client which also set it’s collision group to the same collision group in it’s own local script is somehow firing for the other client when he is on another collision group on his end. They are both setting their collision group locally to a specific collision group, yet it is being fired for both clients despite on their ends being in different collision groups.

Attached place to repro:
LocalCollisionFiltering.rbxl (53.0 KB)

1 Like

I think this is what you are actually looking for. LocalSimulationTouched Please note you will need to re-connect the local touched event after player is died.

LocalSimulationTouched : Fired when another part comes in contact with another object. This event only sends data to the client notifying it that two parts have collided, whereas BasePart.Touched sends data to the server.

CollisionGroup is a replicated property. CollisionGroup settings is replicated between client and server. The touched event is also replicated between client and server to guarantee eventual consistency (i.e. once it’s triggered on one client, the engine makes sure all server and clients receives the event).

For player 1, in my testing, and by design, it always has the same value among all server and clients. Please let me know if you observed something different. Thank you!