I have a turret that fires a part. I want this part to kill the person it touches, but it does not kill. The turret DOES fire the part, but it does not KILL. Please help
gun = script.Parent
gunPos= gun.Position
function firePart()
local part = Instance.new("Part",workspace)
part.Size = Vector3.new(1,1,1)
part.Material = "SmoothPlastic"
part.Position = gunPos
part.Velocity = Vector3.new(0,0,-150)
end
wait(3.2)
while true do
firePart()
wait(0.2)
firePart()
wait(0.2)
end
local part = Instance.new("Part",workspace)
script.Parent.Touched:connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 0
end
end)

1 comment
Did you check that the part is actually hitting the player?