I have not found any example on google about how to make scripts interact with each other. If someone can provide me with one little (commented) example. I will be very happy.
✓ ANSWER ACCEPTED
How do i make one script wait for the output of another (without causing too much lag)?
1 answer
✓ Accepted answer
You could use a BindableEvent, and :Fire() it from script 1. Then, in script 2, you can either do one of the following:
Wait for the event to be fired.
Bind a function to the event.
How would you do these things?
--Fire the event from script 1
BindableEvent:Fire()
--Wait for the event in script 2
BindableEvent.Event:Wait()
--Or, Connect to it in a function
BindableEvent.Event:Connect(functionName)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
The idea i want to understand is that. One Part tells the other it can do something (because an if statement) then from the other part, which receives info(already done that), can activate or stop the function remotelly