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

How to make a car explode when it crashes?

When a car hits another car the parts get broken off then i want the car to explode how can i do that?

7 comments

0

I want the exploding part in the car but i already tried that and the car gets ancored if its ancored it cant drive.

0

You could just cause the car to explode upon the detachment of the part from the vehicle.

0

Wont it need a script?

0

Yes, just used the touched event that detaches the part from the vehicle and create an explosion instance and position it in the car or in the hood of the car or wherever in the car and parent it to the workspace. It'll probably, depending on the BlastRadius and/or the BlastPressure of the explosion, destroy the entire car and kill the driver and passengers but I'm guessing that's the intended res

0

oh ok

0

wow thanks

0

I put the car explode this in the part on the car but whenever i play it just explodes by itself.

1 answer

uh i dont know how'd you make an explosion but here's a script on how to detect a car crash:

Name the parts of the car you are going to crash into.

Also at least try to try to make something before coming to scriptinghelpers, we are helpers not givers.

Also place this script in every peice of a car

local parent = script.Parent
local carpart = "nameofthepartsthecariscrashinginto"

parent.Touched:Connect(Function(checktouched)

if checktouched.Name == carpart then
parent.Anchored = false
parent:BreakJoints()
end
end)

1 comment

0

I already have car crash script, i just need it so when it crashes it explodes

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