this is my full script:
tool = script.Parent
part = Instance.new("Part")
player = game.Players.LocalPlayer
stat = "undone"
h = "nope"
print("im black")
tool.Equipped:connect(function(mouse)
mouse.KeyDown:connect(function(key)
if stat == "undone" and key == "m" then
stat = "done"
print(key)
part.Transparency = .5
part.CanCollide = false
local float = Instance.new("BodyPosition",part)
float.MaxForce = Vector3.new(0,102999,0)
local f = Instance.new("Fire",part)
f.Color = Color3.new(0,0,0)
f.SecondaryColor = Color3.new(255,0,0)
f.Heat = 25
f.Size = 30
local f1 = Instance.new("Fire",part)
f1.Color = Color3.new(0,0,0)
f1.SecondaryColor = Color3.new(255,0,0)
f1.Heat = 25
f1.Size = 30
local f2 = Instance.new("Fire",part)
f2.Color = Color3.new(0,0,0)
f2.SecondaryColor = Color3.new(255,0,0)
f2.Heat = 25
f2.Size = 30
local f3 = Instance.new("Fire",part)
f3.Color = Color3.new(0,0,0)
f3.SecondaryColor = Color3.new(255,0,0)
f3.Heat = 25
local f4 = Instance.new("Fire",part)
f4.Color = Color3.new(0,0,0)
f4.SecondaryColor = Color3.new(255,0,0)
f4.Heat = 25
f4.Size = 30
local f5 = Instance.new("Fire",part)
f5.Color = Color3.new(0,0,0)
f5.SecondaryColor = Color3.new(255,0,0)
f5.Heat = 25
f5.Size = 30
local f6 = Instance.new("Fire",part)
f6.Color = Color3.new(0,0,0)
f6.SecondaryColor = Color3.new(255,0,0)
f6.Heat = 25
f6.Size = 30
local f7 = Instance.new("Fire",part)
f7.Color = Color3.new(0,0,0)
f7.SecondaryColor = Color3.new(255,0,0)
f7.Heat = 25
f7.Size = 30
local f8 = Instance.new("Fire",part)
f8.Color = Color3.new(0,0,0)
f8.SecondaryColor = Color3.new(255,0,0)
f8.Heat = 25
f8.Size = 30
local f9 = Instance.new("Fire",part)
f9.Color = Color3.new(0,0,0)
f9.SecondaryColor = Color3.new(255,0,0)
f9.Heat = 25
f9.Size = 30
local f10 = Instance.new("Fire",part)
f10.Color = Color3.new(0,0,0)
f10.SecondaryColor = Color3.new(255,0,0)
f10.Heat = 25
f10.Size = 30
local f11 = Instance.new("Fire",part)
f11.Color = Color3.new(0,0,0)
f11.SecondaryColor = Color3.new(255,0,0)
f11.Heat = 25
f11.Size = 30
local f12 = Instance.new("Fire",part)
f12.Color = Color3.new(0,0,0)
f12.SecondaryColor = Color3.new(255,0,0)
f12.Heat = 25
f12.Size = 30
local f13 = Instance.new("Fire",part)
f13.Color = Color3.new(0,0,0)
f13.SecondaryColor = Color3.new(255,0,0)
f13.Heat = 25
f13.Size = 30
local head = script.Parent.Parent.Head
part.CFrame = player.Character.Torso.CFrame * CFrame.new(0,2,-5)
part.Size = Vector3.new(10,10,10)
part.Shape = "Ball"
part.BrickColor = BrickColor.new("Really black")
part.Velocity = player.Character.Torso.CFrame.lookVector * 120
local bod = Instance.new("BodyVelocity")
bod.MaxForce = Vector3.new(30,30,30)
bod.Velocity = player.Character.Torso.CFrame.lookVector * 120
part.Parent = game.Workspace
bod.Parent = part
wait(4)
part:Remove()
stat = "undone"
end
end)
end)
part.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil and h == "nope" then
h = "Yep"
local h = hit.Parent:FindFirstChild("Humanoid")
h:TakeDamage(2)
print("it has been dont-"..h.Health)
wait(2)
h = "nope"
end
end)
But i want to focus on the main issue
if hit.Parent:FindFirstChild("Humanoid") ~= nil and h == "nope" then
h = "Yep"
local h = hit.Parent:FindFirstChild("Humanoid")
h:TakeDamage(2)
print("it has been done-"..h.Health)
wait(2)
h = "nope"
end
Why is it that this part fires only once

6 comments
the variable situtaion was a mistake on my part, dont know how i missed that, but this event still only fires once. Even with the fixed debounce it still fails to fire for each part shot
here is the fixed version : http://prntscr.com/8cqvg9
That's because part is a variable referencing the very first part created in the second line of your script and only that individual instance
any suggestions
See my edit
thx