I didn't understand connections for a long time but what I've learned is look in the object explorer and select of thing you're modifying. Part, mouse, tool, etc. On the right of your screen should have all the things you can use with that object. Under part for example there would be Touched. So for a touching a part it would be:
6 | script.Parent.Touched:connect(hit) |
An 'advanced' function is what I call a function that has the connect in the function line, EX:
1 | script.Parent.Touched:connect( function (hit) |
This type of 'advanced' function helps save time because you don't have to scroll down to the end of the script to check if you called the connect or 'completed' the function yet.
For gui textbuttons or imagebuttons if you want it to do something when its clicked you would do a function like this:
1 | script.Parent.MouseButton 1 Click( function (click) |
2 | script.Parent.Text = "IT CHANGED ZOMG" |
You don't need that line on the bottom connecting the Function (click) to mousebutton1click because you used an 'advanced' function.
This took a good 15 minutes of writing. Hope it helped, I really had issues with this stuff before so I hope I can make it easier for you :)