Change properties with a table?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to be able to change an object’s properties with a table

  2. What is the issue? Include screenshots / videos if possible!
    I have no idea how I can do this.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Yes, i have looked on the Dev Hub, and found no answers, although I think i have seen it done before.

What do you mean exactly by changing properties with a table? Do you mean something like this?

local part = workspace.Part

local properties = {
    Material = Enum.Material.Neon,
    Name = "Bob"
}

for property, value in pairs(properties) do
    part[property] = value
end

Or do you mean something else?

5 Likes