Create a new table called “PropertyClassProxy”.
Create a new table entry inside of the created table called “Changed”.
Create a new table entry inside of the “Changed” table called “Connections.”
Create a function called “Fire” or “FireAllKeys”.
It should look like this.
local PropertyClassProxy= {};
PropertyClassProxy["Changed"] = {};
PropertyClassProxy["Changed"].Connections = {};
function PropertyClassProxy.Changed:FireAllKeys(key, value)
for i,v in pairs(PropertyClassProxy.Changed.Connections) do
v(key, value);
end
end
function PropertyClassProxy.Changed:Connect(fn)
PropertyClassProxy.Changed.Connections[#PropertyClassProxy.Changed.Connections+1] = fn;
end
Next, set the __newindex of “PropertyClassProxy” to fire all keys when receiving a new entry, and to rawset the index of the original table.
It should look something like this.