Are these 2 ways of using Touch, work the same way or which one is better?
1 | function onTouch(hit) |
2 |
3 | print "Hello!" |
4 |
5 | end |
6 |
7 | script.Parent.Touched:connect(onTouch) |
1 | script.Parent.Touched:connect( function (hit) |
2 |
3 | print "Hello!" |
4 |
5 | end ) |
I Prefer the bottom one it uses less lines of code.