How can I select all instances of a specific type?

Hi, I recently built a very large map and every part uses textures, I recently decided to replace the old textures with new ones, however, it takes very long to select all the parts that have textures and only select the textures and THEN deselect the part (if that made any sense, I’m not the best at explaining haha)

If there is a way, please let me know, I kinda really need this right now… heh
Thank you in advance

1 Like

use a script

write a script in command line that loops through every instance in your game checks if its a part you want to change then changes its texture or colour or whatever

then run it in command line so that it changes it in studio

if you show me the explorer etc and what it is you are trying to change i might just code it for ya

2 Likes

In command bar, use a for loop.

for i,v in pairs(game.Workspace:GetDescendants()) do 
   if (v:isA("Texture")) then
      if (v.Texture == "OldTextureID") then
         v.Texture = "NewTextureID"
      end
   end
end

Change game.Workspace to wherever you want to search (ServerStorage, ReplicatedStorage, etc.)

4 Likes

this worked, thank you very very much!

1 Like