How to change property of multiple objects / meshes at once?

  1. What do you want to achieve? Trying to change the RenderFedility value of all the meshes on the map, however the only way I have found so far is changing it via code and we want to change the value permanently.

  2. What is the issue? We cannot figure out a way of doing this

  3. What solutions have you tried so far? Tried looking for a plugin, tried searching Google, the Dev Forums, and more. This doesn’t seem to be mentioned anywhere

We’re really struggling with this - Please if you have any idea how to edit the RenderFedility value in the Studio without having to play test, let me know!

4 Likes

Do you mean change multiple objects changing property with 1 script? Well you can use pairs loop for that.
https://www.lua.org/pil/7.3.html

local Meshes = {} --Insert mesh directory here
local Meshes = workspace.Folder:GetChildren() --Or you can do this to get the mesh objects in a certain folder

for _, v in pairs(Meshes) do
    v.RenderFidelity = --Whatever
end

You can also use CollectionService if all the meshes won’t be in a precise folder.

2 Likes

If the meshes aren’t organized in a folder and you just want to loop through everything in the workspace, you can also use “:GetDescendants()”, which checks every object value.

for _, meshPart in ipairs(workspace:GetDescendants()) do
    if meshPart:IsA("MeshPart") then 
        meshPart.RenderFidelity = -- "Insert Value Here"
    end
end
9 Likes

Sorry, I should have explained a bit more!

We are worried that doing it through code will cause every single mesh to go under moderation. Is there a way to bypass that? Are we wrong in thinking that?

Thanks!

1 Like

We’ve decided to approach this a bit differently - having it set this way wasn’t getting the results we wanted anyway. Thank you guys!

1 Like