I'm trying to make vehicle when it like gets flipped over, it explodes and the parts along it are caught on fire. So far I made brick and put it on top of the vehicle; however, it explodes when a player touches the brick. How do I make so that it blows up when it touches the ground or the object rather than a humanoid player? Here's my script;
wait (1)
function boom()
script.Parent.Anchored = true
script.Parent.Parent.Gun1.Anchored = true
script.Parent.Parent.Gun2.Anchored = true
script.Parent.Parent.Engine.Anchored = true
wait (0.01)
a = Instance.new ("Explosion")
a.Parent = Workspace
a.Position = script.Parent.Position
a.BlastRadius = 10
wait (1)
script.Parent.Anchored = false
script.Parent.Parent.Gun1.Anchored = false
script.Parent.Parent.Gun2.Anchored = false
script.Parent.Parent.Engine.Anchored = false
b = Instance.new ("Fire")
b.Parent = script.Parent
b.Size = 10
c = Instance.new ("Fire")
c.Parent = script.Parent.Parent.Gun1
c.Size = 10
d = Instance.new ("Fire")
d.Parent = script.Parent.Parent.Gun2
d.Size = 10
e = Instance.new ("Fire")
e.Parent = script.Parent.Parent.Engine
e.Size = 10
wait (0.1)
script:remove()
end
script.Parent.Touched:connect (boom)

1 comment
just add sn if statement