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

How do you make an object disappear when it collides with another object?

So I've been wondering how you'd put this into code v

if BrickA collides with BrickB then/ if BrickA touches BrickB then

What would you replace "touches"/"collides with" with? You don't need to tell me how you'd make the object disappear because I already have that part down...

1 answer

✓ Accepted answer
function Check(hit)
	if hit.ClassName == "Part" then
		script.Parent.Transparency = 1
	end
end

script.Parent.Touched:connect(Check)

2 comments

0

The part will still exist and be interacted with by any part, it will just be invisible.

0

Thanks..and don't worry. I have the rest down already.

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