Last active
April 16, 2024 02:30
-
-
Save ryanlua/8af8a6928fd2f368be7533354879f0a5 to your computer and use it in GitHub Desktop.
Removes all CanTouch and CanQuery collision events for better performance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local ChangeHistoryService = game:GetService("ChangeHistoryService") | |
| local recording = ChangeHistoryService:TryBeginRecording("Disable CanTouch and CanQuery on BaseParts") | |
| for _, descendant in pairs(game:GetDescendants()) do | |
| if descendant:IsA("BasePart") then | |
| descendant.CanTouch = false | |
| descendant.CanQuery = false | |
| end | |
| end | |
| ChangeHistoryService:FinishRecording(recording, Enum.FinishRecordingOperation.Commit) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment