Is there anymore ways to get an instance's property?

I am trying to create a script that creates multiple objects with a for each loop. I am not sure this is possible as I don’t know if there’s alternative methods that can help me. Can someone help me?

local group = script.Group

local objects = {
	{"ValueA", "BoolValue", {"Value", true}},
	{"ValueB", "IntValue", {"Value", 42}},
	{"ValueC", "StringValue", {"Value", "abc"}},
	{"Folder", "Folder", {}}
}

for _, i in ipairs(objects) do
	local object = Instance.new(i[2])
	object.Name = i[1]
	
	if #i[3] > 0 then
		for _, j in ipairs(i[3]) do
			-- object.j[1] = j[2]
		end
	end
	
	object.Parent = group
end

I think your best bet is to use someone else’s module for it. Anaminus (I think) had one. I’ll see if I can dig one up that I used to use.

1 Like

Alright, here’s the one I used to use. Anaminus has a website that scrapes data off of the Roblox releases and such, so you get every method and class, even the hidden ones. This module uses his automatically-updating website to get a list of properties and methods.

I can’t guarantee anything still works, I last used it like four years ago. But there are likely newer ones if you look around.

1 Like

Thanks, let me take a look into the module.

Actually, I found my own solution that would work with me. Thank you for trying to help me anyway. :slight_smile:

objects = {
	{Instance.new("IntValue"), function(x)
		x.Name = "CreamPie"
		x.Value = 42
	end, workspace},
	{Instance.new("StringValue"), function(x)
		x.Name = "SodaPop"
		x.Value = "Bubbles!"
	end, workspace}
}

for _, i in ipairs(objects) do
	local obj = i[1]
	i[2](obj)
	obj = obj:Clone()
	obj.Parent = i[3]
end