Skip to content

Instantly share code, notes, and snippets.

@ryanlua
Last active April 16, 2024 02:29
Show Gist options
  • Select an option

  • Save ryanlua/2e10234514268be428fdce118461d9c8 to your computer and use it in GitHub Desktop.

Select an option

Save ryanlua/2e10234514268be428fdce118461d9c8 to your computer and use it in GitHub Desktop.
Optimizes the appearance of Meshes and Unions by setting RenderFidelity
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