So for example if you had part1 and part2, and you want something to happen when the two parts touch, is there a function for that? kind of like the onTouched function but i'm pretty sure that one only works when a humanoid touches the object. Thanks for any help guys!
OnTouched works for anything. It does not have to be a humanoid.
So:
part1.Touched:connect(function(hit) if hit == part2 then print("Part1 was touched by Part2") end end)
The touched event fires on anything that hits it. Keep in mind it's called Touched and not onTouched!
Part1 = workspace.Part1 Part2 = workspace.Part2 Part1.Touched:connect(function(Hit) if Hit == Part2 then print("Hit") end end)