How do I have two localscripts communicate with each other?

i’m not really good at explaining things, so feel free to ask questions!

i have a script (lets call script1) that, upon specific circumstances, will change an ImageLabel’s parent. unfortunately, another script (script2) isn’t able to pick up on this right now.
what i WANT to avoid doing is to have script2 listen for every time the ImageLabel’s parent changes and check if it’s a specific parent, because ImageLabel’s parent changes a lot already.

is there a way that, like how RemoteEvents communicate between a client and server, that two localscripts can communicate between each other?

Could you incorporate the two scripts together, or implement your if statement into the part that changes the ImageLabel’s parent?

Yes, use bindable events or bindable functions, they’re made for same-boundary communication.

5 Likes

i would, but it would make things a lot messier on my end (plus script2 also does other things that can’t run while script1 is running, otherwise certain things will hang/pause)

Ah okay that would be my first suggestion but otherwise do what cody said above

1 Like

i had no idea these existed!! i’ll have to look into that. thank you!

1 Like