Hello, I am wondering how to detect when two parts collide, and especially when the parts touch +1 will be added to the leaderstat. E.G when block1 touches block2 then it will +1 to the leaderstats. I know how to do this with humanoids as I know the certain function used but unable to know how to do it with 2 parts. If anyone could help that would be useful ty.
COMMUNITY QUESTION
How to detect two parts collision?
2 answers
local part1 = putpart1here
local part2 = putpart2here
part1.Touched:Connect(function(hit)
if hit == part2 then
-- script here
end
end)
local part1 = part1whereveritis
local part2 = part2whereveritis
part1.Touched:Connect(function(hit)
if not hit.Parent:FindFirstChild("Humanoid") and hit.Parent == part2 then
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
if it doesn't work dm me at discord Blue Duck#8344