When a car hits another car the parts get broken off then i want the car to explode how can i do that?
COMMUNITY QUESTION
How to make a car explode when it crashes?
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.

7 comments
I want the exploding part in the car but i already tried that and the car gets ancored if its ancored it cant drive.
You could just cause the car to explode upon the detachment of the part from the vehicle.
Wont it need a script?
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
oh ok
wow thanks
I put the car explode this in the part on the car but whenever i play it just explodes by itself.