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 comment
ExplosionType is for the type of hole it makes in terrain.....