Find out where a value is changing from

Hey, basically I have a table in a module script, I’d like to convert this table to a metatable and find out when a value in the table changes and find out which script changed the value of this index in the table. I need this for debugging purposes as I believe somewhere in some older code I wrote something which is changing this value when I don’t want it to because I have tested and know for sure my new code isn’t the one causing it.

Any help would be appreciated, Thanks!

2 Likes

Sounds like you should find a different form of debugging and/or code review instead. The script variable just gives you a reference to the script object which probably isn’t very helpful. Check your environment and tools carefully, things don’t just change randomly.