I am setting up a path of nodes that are named “NodeX”. I do this by setting up the first node then press Ctrl + D and move the next node into position, then repeat. Now I have to go back and rename each node so they can be ordered.
When I press Ctrl + D, studio should check if the last characters of the instance name are numbers and if they are then increment it by one. This would reduce the amount of time I have to spend setting up this path. It should be an option that can be disabled in studio settings, “Auto increment instance names”
local function IncrementName(Name: string): string
local Value = tonumber(Name:match("%d+$"))
if (Value) then
return (Name:gsub("%d+$", Value + 1))
end
return Name
end
This isn’t always desired behavior. If you have a script that searches for all parts named “Lava” (bad practice to use names instead of tags but people do it anyway) and gives them lava behavior, you’ll have to rename a lava brick every time you clone it.
If I’m not mistaken, this is a feature that can be perfectly implemented with a plugin - write some code that uses a plugin action to clone the selection and increment the names, then unbind the original Duplicate action and bind the plugin action to Ctrl+D.
It would only increment if the last characters in a string are numbers. If you just have a part named Lava and duplicate it, it wouldnt change the name at all. Only if it was named Lava1