Last active
April 16, 2024 02:29
-
-
Save ryanlua/2e10234514268be428fdce118461d9c8 to your computer and use it in GitHub Desktop.
Optimizes the appearance of Meshes and Unions by setting RenderFidelity
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("Change RenderFidelity to Performance/Automatic") | |
| for _, descendant in pairs(game:GetDescendants()) do | |
| if descendant:IsA("MeshPart") then | |
| descendant.RenderFidelity = Enum.RenderFidelity.Performance | |
| elseif descendant:IsA("UnionOperation") then | |
| descendant.RenderFidelity = Enum.RenderFidelity.Automatic | |
| 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