Not sure if this is the best way to word it but
What do you want to achieve? I want to “dynamically” change the properties of an Instance (Frame) from a table containing multiple property names.
Basically, I have this table which are the changes applied to a Frame by the user:
local propertiesToApply = {
BackgroundTransparency = 0.5,
BackgroundColor3 = Color3.new(0,0,0)
}
Once the user clicks a button I want to create a frame with those properties.
My approach here is:
local frame = Instance.new("Frame")
frame.Name="ExportFrame"
for key, value in pairs(propertiesToApply) do
print("Applying ".. key.. " of ".. value)
-- I want to apply the "key" (BackgroundTransparency) to the frame with the "value" being (0.5)
-- can I do frame[key] = value ?
end
frame.Parent = ScreenGui
will frame[key] = value
work here or is there a built in function
to change properties of an Instance that I don’t know of?
Thank you for helping