New Part Collision Property: CanTouch [ACTIVATED]

As others have already said, yes! We back!

7 Likes

Yes we need descriptions on https://developer.roblox.com/, however we do have a definition in the original post:

I recommend turning it on, as it’s a more consistent behavior. (Groups set to not collide should not fire each other’s touch events)
Do you have any questions about this?

2 Likes

63b0bb343bec216df1df843d68932ce4

When creating a tool that doesn’t need any sort of collision, this warning pops up when taking it out of your backpack.

Is this an intended feature?

1 Like

The tool’s handle is trying to connect a Touched event, probably so players can pick it up or it has some behavior when hitting something.
If it’s not meant to have any kind of collision interaction with anything, you should edit the script to not connect a Touched event. Otherwise, keep CanTouch set to True.

EDIT: Correction, it looks like Tools will create a Touched event with the handle internally for backend processing, so really you should never disable CanTouch on a tool’s handle.
If you really want to keep Tool’s handle from firing touch events, you could set Tool.requiresHandle=false, and weld a mesh onto the character seperatly.

4 Likes

I’ll just keep the CanTouch property for the handle true. I was only disabling them to slightly improve performance, since my guns don’t need to collide with anything.

1 Like

Is it weird how I only noticed this just now?

1 Like

It seems to work well, although i get weird bug where if i disable CanTouch and re-enable it my touch detectors seem not to work [“There is no error being outputed on the server”].

1 Like

Could you please post a bug report for this? Feel free to tag me in it after

1 Like

I can’t because i have no ability to create a draft in the bug section, is there any other way i can report this bug?

1 Like

Is there maybe an introduction on how it works? I wanna test this but I don’t know how to start.

1 Like

Send your bug report as a direct message to @bug-support. (Following the correct format of course)

1 Like

Is this a bug? If the touch events were established before changing the property then it makes sense that the property change would shutdown those touch events. At least to me it makes sense.

3 Likes

Never mind, i re-published the place today and it all works now!

After setting CanTouch = false on all non-collidable and non-touchable parts in our huge open-world game, I haven’t noticed any performance or memory usage improvement.

1 Like

image
I never set any of those parts CanTouch to false. Does this mean I’ve got to manually set it to false?

It appears to be set to false on the client but true on the server

Very useful, but is there a way to have it work with GetTouchingParts()? I couldn’t get that function to work unless I connected another touch function first.

This behavior will also extend to BasePart:GetTouchingParts . This function ignores all parts with CanCollide set to False , unless the caller part has a TouchTransmitter (is listening for touch events). If that’s the case, all parts with CanTouch set to False will still be ignored.

Is there a reason that you still have to insert a touch transmitter?

1 Like

Thank you very much for this. This is a game changer in my project. I have thousands of active elements in my game, so I decided to connect Touched function to humanoid instead and filter out all inactive elements. By using this property I can vastly reduce amount of calls. Big thanks.

Are there plans to get rid of the warning message “Collider has CanTouch set to False. TouchTransmitter will be removed.”?

1 Like

Will this be planned to work on raycasts soon? Am having an annoying issue with HumanoidRootParts, and i was thinking of using CanTouch set to false to ignore hitting it but Raycasts still collide with it.

I have the same issue it just totally made my game unplayable

used this to spawn food for the players to collect… which now has stopped working

https://www.roblox.com/games/3138006609