Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

ExplosionType?

1 comment

0

ExplosionType is for the type of hole it makes in terrain.....

This discussion is preserved as it was. New answers, comments, and votes are closed.