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

My bullet won't explode.. Help meee??

Asked by
lucas4114 607 Moderation Voter
8 years ago

I have this part of my script in the bullet, the bullet is ment to explode if it hits any part named: "Part" or "Union" and not ment to explode if it hits it's own user but it will for other players..

Bullet.Touched:connect(function(Part)
    local Humanoid = Part.Parent:FindFirstChild("Humanoid")
    if Part and Part.Name == "Part" or Part.Name == "Terrain" or Part.Name == "Union" then
        HasExploded = false
        ExplosionPosition = Bullet.Position
        Explode()
    elseif Humanoid and not Humanoid.Parent.Name == user.Name then
        HasExploded = false
        ExplosionPosition = Bullet.Position
        Explode()
    end
end)

It works when it hits anything named part, union or terrain, but if it hits a different player it just bounces off, and same for it's own user... :/ Output doesn't say anything, and this is in a normal script....

I also tryed this:

Bullet.Touched:connect(function(Part)
    local Humanoid = Part.Parent:FindFirstChild("Humanoid")
    if Part and Part.Name == "Part" or Part.Name == "Terrain" or Humanoid and not Humanoid.Parent.Name == user.Name then
        HasExploded = false
        ExplosionPosition = Bullet.Position
        Explode()
    end
end)

1 answer

Log in to vote
0
Answered by 8 years ago

ExplosionType?

0
ExplosionType is for the type of hole it makes in terrain..... lucas4114 607 — 8y
Ad

Answer this question