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

A script that destroys a part on touch with a different part

Im trying to make it so that when part1 touches part2, part2 disappears any help?

Thanks,

Exsius

1 answer

✓ Accepted answer
function onTouched(hit)
	if hit.Name == "part1" then
		script.Parent:Destroy()
	end
end

script.Parent.Touched:connect(onTouched)

This script goes inside part2.

1 comment

0

Ok thanks!

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