Changing part names permanently?

I have been working on a game recently, and it currently requires mass renaming of parts. I have set up a script to do this mass renaming, and it works, except it is not permanent. The second I hit stop, the changes are reverted and everything goes back to the way it was. My question is, is there a way to make these changes permanent, or do I have to go through and rename everything manually?

This is the script, although I doubt that it will help much.

local bigGroup = script.Parent.Parent.Name
local group = script.Parent:GetDescendants()
local renameSplit = string.split(bigGroup, "e")
local rename = "TRTGL"
local split

for i, v in pairs(group) do
	if v.Name ~= "MassNameChanger" then
		split = string.split(v.Name, "_")
		v.Name = rename .. renameSplit[2] .. "_" .. split[2]
	end
end
1 Like

You can run the code from the Command bar, although you’ll need to change stuff that use script to directly reference the location of the thing to rename

2 Likes

That actually worked. I was surprised, since I had tried to use the command bar before, and it just didn’t work well, as the code would execute weirdly because it was all on one line. However, I wasn’t copy + pasting, and that seems to work much better. Thanks for the help!

This saved me from having to rename 990 different things haha.

1 Like

If you ever plan on making more code to run for the command bar, I recommend writing it as if you were writing a script so you can look at it in a much more organized view, and then copy nad paste it to the command bar

1 Like