Would disabling “CanTouch” on almost all parts of a character improve performance?

Hi I’m trying to optimize a Roblox game and I got to thinking if I disable “CanTouch” on each part of a player and only leave 1 as hitbox , it would improve performance no? Or will it be a very small improvement (considering it’s a big server with r15 characters)?

doing that would maybe optimize it, but probably very minimally, optimizing comes mostly from scripts, open the script performance tab and run your game, see the statistics of your script performance from there and see if anything has to be optimized

You are very wrong.
Main perfomance hit comes from physics and rendering.
Disabling CanTouch would significantly improve perfomance on a game with high player count per server.

1 Like

no you won’t see a difference unless you’re problematically tying .Touched to every descendant BasePart in the game.

research ‘TouchTransmitter’ and come back to this thread, thanks

expanding on what @InfiniteYield said, although performance mainly comes from physics and rendering, I don’t think that’s relevant when it comes to CanTouch, or even a property like CanQuery, because unless your actually using operations such as .Touched or raycasting, it doesn’t impact performance so much,.

correct, .Touched is what invokes actually listening at the engine level because it creates a RBXScriptConnection and instantiates a TouchInterest/TouchTransmitter. CanQuery and CanTouch were just a property that was added to aid developers when they perform operations like Raycasting or using .Touched for things like hitboxes or more importantly :GetTouchingParts() which is what it’s actually more applicable for, as that’s more of a generalized API usage than knowingly tying a .Touched event.

plus, even if it were still somehow being checked (even though .Touched is purely a lua api formality under the PVInstance class for dev use, not physics operations), workspace:GetNumAwakeParts() tells you what’s actually being simulated regardless which is never the entire experience, so this optimization is largely pointless.

2 Likes

Approved Digital Worker - Code Sector:

Observation:

Unverified data replication has been noted. Suggestion to engage in preliminary authorized knowledge acquisition protocols before projecting institutional positioning.

Summary Conclusion:

Initial deduction aligns with reality. Contradictory assertions display deviation from verified communal truthset.

:locked: Status:

Information integrity maintained. Counter-narrative flagged as unsound.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.