How to change every single mesh CollisionFidelity in a game

Basically, I have been working on a map for months, it has thousands and thousands of meshes and parts.

Recently, I went into test mode and realized that many of my meshes were set to “Box” CollisionFidelity, unluckily the MeshImporter plugin automatically sets the meshes to Box, which can be good in some cases when we don’t need the collision to be perfect and may be good for performance.

But, I need most of the stuff to be in Default, not even PreciseConvex I just want everything to be in Default right now.

I can’t just “Ctrl A” and start selecting children because I have everything organized in Folders, so when selecting all it won’t select stuff in folders.
Also going each folder selecting all and selecting children and changing the collision is possible but will take a long time, there are more than 200k parts and meshes etc.

So I’m looking for a quick fix, change every single thing in the map to Default CollisionFidelity

Any help is really appreciated.

4 Likes

Maybe try expanding all folders then select all of them. I think that is one easy way maybe it will take long.

3 Likes

Yeah that is a solution but there are many folders, + many sub folders + many models that contain many models, etc etc etc, the process will just take for ever

1 Like

There is this one plugin that expands all of them and shrinks them again.

1 Like

You could try running code in the command bar in studio to change all MeshParts in workspace to have a Default collision fidelity:

local main = workspace

for _, object in pairs(main:GetDescendants()) do
	if object:IsA("MeshPart") then
		object.CollisionFidelity = "Default"
	end
end

I’d suggest making a backup of your place before trying this out. Also, since it has to loop through every object in the workspace, it may freeze studio for a few seconds or more depending on your device.

6 Likes

Why not use the Search bar at the top of the Explorer window? Last I used it it would open up each folder/model down to the actual MeshPart.
Search MeshPart, select all, then in the Properties window change to Default. Even if it does select more than just the MeshParts in the list CollisionFidelity is only a property of the MeshParts that are selected.

2 Likes