Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Listening for infinite number of changed events?

Asked by 8 years ago

As you know most objects have a changed event but they require an event listener for code to run.

I am creating a anti-cheat/hack script that will use a lot of changed event listener all of which will have a min-max range or a fixed value that will be checked when the value is changed.

As there could be an infinite number of changed events it would be impractical to hard code each event e.g.

obj1.Changed:connect( some function)
obj2.Changed:connect( some function)
....

How would I be able to attack multiple changed events in one script to different types of functions such as one for Booleans, text and integers.

Edit:-

I am able to find all instances of an object so its just how to attach the events efficiently scan for all instances of an object

Comment if you need any more info.

Answer this question