RenderFidelity Script not working

Hey everyone! I was building a map earlier and I’ve been using a lot meshparts so it’s more visually appealing and the map is huge. I wanted it to be playable on low performance devices and there are way too many meshes to search through each one and change their RenderFidelity mode. I made a script and put it in workspace but it does not work. This is the script:

local Children = game.Workspace:GetDescendants()

		for _, descendant in pairs(Children) do
			if descendant:IsA("MeshPart") then
		descendant = Enum.RenderFidelity.Performance
			end
		end
1 Like

Might lag a bit if you have thousands and thousands of instances as it’s iterating through the entire workspace, but this should work.

for _, gameInstance in workspace:GetDescendants() do
	if gameInstance:IsA("MeshPart") then
		gameInstance.RenderFidelity = Enum.RenderFidelity.Performance
	end
end

Idk it still didn’t work for me

Are you putting the code into the command bar? And is it exactly what I wrote? Because it should be working.

No the script is inside yk a script

I just put it in the command bar and i think it’s working but it’s taking a while, but tysm!