Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

onTouch Question Help?

Asked by 9 years ago

Are these 2 ways of using Touch, work the same way or which one is better?

function onTouch(hit)

print"Hello!"   

end

script.Parent.Touched:connect(onTouch)

script.Parent.Touched:connect(function (hit)

print"Hello!"

end)
2
Almost no difference. It's based on your preference. :3 Redbullusa 1580 — 9y
0
I like the bottom one more QuantumScripter 48 — 9y
0
You can utilize this to take advantage of organizing your script. Redbullusa 1580 — 9y
0
Yes QuantumScripter 48 — 9y

1 answer

Log in to vote
3
Answered by
Hero_ic 502 Moderation Voter
9 years ago

I Prefer the bottom one it uses less lines of code.

0
Me too :D QuantumScripter 48 — 9y
Ad

Answer this question