I've been making some Touched scripts and wanted to know if there's a difference between connecting the function whenever the part is touched, because I've seen people do it two different ways.
The way I normally do it is:
function Test()
print("Hello!")
end
script.Parent.Touched:Connect(Test)
But I've seen some other people use:
script.Parent.Touched:Connect(function(Test)
print("Hello!")
end)
Is one way better to use then the other, or is it just used differently for cosmetic purposes?

2 comments
it really depends what your using it for, there is no real difference, at the second example your just putting the function between the parantheses instead of putting an already existing function there, it depends on your usecase, for example, if you need to call the function from multiple events it's better to do it with way 1, while if you only need it for e.g. a touched event 2 is good too
Ah ok. Thanks mate.