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 make parts disapear after being blown up?

How do I make it so parts disappear after being blown up by a bomb or a rocket launcher?

I tried using a humanoid instance along with a script which destroys the block when the humanoid's health reached 0 but rockets or bombs didn't affect the humanoid's health.

3 comments

0

You make the transparency of the objects 1 and CanCollide = false

0

or just use :Destroy()

0

If you want to access the parts later, however, you can set the part's parent to nil or use DebrisService (they do pretty much the same thing). This way, the object still exists and can still be accessed, but players cannot see them or interact with them. Here's how you would use the DebrisService: https://www.robloxdev.com/api-reference/function/Debris/AddItem.

1 answer

Use the Debris service.

game:GetService("Debris"):AddItem(item,time) -- First parameter is the instance, and the second is the amount of time taken to delete the Instance.

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