Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

[Renaming Parts Through Script because Im lazy?]

Trying to rename every part in sync like "Part1" , "Part2" ...

parts =  script.Parent:GetChildren()
for i=1, #parts +1 do
	parts.Name = "Part" .. i
	
end

3 answers

✓ Accepted answer
local Num=0
for i,v in pairs(workspace:GetChildren()) do
	if v:IsA("BasePart") and v.Name~="Terrain" then
		Num=Num+1
		v.Name="Part"..Num
	end
end
parts =  game.Workspace:GetChildren()--This get all the Child that are Workspace
for i,v in pairs (parts) do 
v.Name = "Part" .. i
	wait(1)
end

3 comments

0

If It works then Please accept my answer and if you want me to explain how it work just ask.

0

Didnt work

0

I check it and it worked fine.

game.Workspace.part = game.Workspace.Part1 

part.Name = ("Name")

Just do that for Part2 as well.

This discussion is preserved as it was. New answers, comments, and votes are closed.