Can someone help me on how you can make it where if a part touches another part it triggers something?
COMMUNITY QUESTION
How can I make it where if a part touches another it triggers something?
1 answer
You can use the .Touched event to fire something whenever a part is touched!
local part = script.Parent
part.Touched:Connect(function(hit)--//If you want to detect something, add the hit parameter. You can also use obj
print(hit.Parent.Name) --//Prints the hit parents name!
--//The rest of your code here.
end)
If you want more information on it, I suggest you look at it on the dev forum
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
use the '.Touched' function to detect a part with ':IsA'
Can you elaborate more please?
https://developer.roblox.com/en-us/api-reference/function/Instance/IsA