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

How can I make a table that creates multiple parts with the same name?

Like the title suggests, I'm trying to create a script where I'm using a table to create multiple parts that share the same name. This is the script I tried:

local EpicPart = Instance.new("Part")


Table1 = {EpicPart,EpicPart,EpicPart}

a = 30

for i,v in pairs (Table1) do
	v.Parent = game.Workspace
	v.Position = Vector3.new(0,0,a)
	a = a + 5
	v.Anchored = true
	v.CanCollide = true
	v.Touched:Connect(function(hit)
	local humanoid = hit.Parent:FindFirstChild("Humanoid")
    if humanoid then humanoid.Health = humanoid.Health - 100
	
	
	
end
		
		
	end)
	
	
	
end

1 answer

✓ Accepted answer

Okay so I found the answer, all I had to do was put "v:Clone().Parent = game.Workspace"

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