For the past 2 days I was working on a plugin, and I was making these properties, the properties are a frame instance, and all of them have Input child as an instance. How could I make this actually working.
Script:
Parameters:GetChildren().Changed:Connect(function(a)
for _, parameter in pairs (Parameters:GetChildren()) do
if parameter:IsA("Frame") then
Settings.Themes:SetAttribute(parameter.Name, parameter.Input.Text)
print(Settings.Themes:GetAttribute(parameter.Name))
end
end
end)
What you could do is just loop over those parameters and then get it’s name, and then adjust the attributes depending on the values. So that means you have to loop. You can also make your own special class in lua for inserting events into array of objects, so you can handle that pretty nicely.
like
insertEventIntoObjects(EventName:string,Function,Objects)
--reference event by doing the Object[EventName] trick and then connect it