I have a rocket that when something touches the tip, it explodes. However, when I drop it, it explodes because it collided with itself. How do I tell it not to explode if they collide with a part of a rocket? here's the script:
local model = script.Parent.Parent
model.PrimaryPart = model.Base
model.Base.Fire.Enabled = true
local explosionPart = script.Parent
while true do
wait()
script.Parent.Parent:SetPrimaryPartCFrame(script.Parent.Parent.PrimaryPart.CFrame * CFrame.fromEulerAnglesXYZ(0,.1,0))
script.Parent.Touched:connect(function(hit)
if hit:IsDescendantOf(script.Parent.Parent) == false then
local explosion = Instance.new("Explosion", game.Workspace)
explosion.Position = explosionPart.Position
explosionPart.Parent:Destroy()
end
end)
end
