Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do i make parts disapear after being blown up?

Asked by 5 years ago

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.

0
You make the transparency of the objects 1 and CanCollide = false mixgingengerina10 223 — 5y
0
or just use :Destroy() mixgingengerina10 223 — 5y
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. lunatic5 409 — 5y

1 answer

Log in to vote
0
Answered by
piRadians 297 Moderation Voter
5 years ago

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.
Ad

Answer this question