Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I pick out 2 blocks that are touched?

Im a little confused on how you pick out 2 blocks that may have been touched. So as if, one block was touched, that counts. If the other block it touched, it counts too. Please help

1 comment

0

thanks for the help

1 answer

If what you're trying to ask is how to have two parts' Touched events connected to the same function, all you have to do is declare the function as a variable.

function touched(hit)
	print("one of the two parts was touched by "..hit.Name)
end

part1.Touched:connect(touched)
part2.Touched:connect(touched)

This discussion is preserved as it was. New answers, comments, and votes are closed.