i have this killbrick that goes up in my game that acts as the flood but the brick is refusing to kill the player. anyone help??
local flood = script.Parent
local gamestatus = game.ReplicatedStorage.GameStatus
countdown = 5
for i = countdown, 0, -1 do
gamestatus.Value = i
wait(1)
end
for i = -152.75, -73.75, 1 do
flood.Position = Vector3.new(82.545, i, -106.735)
wait(1)
end
local function steppedOn(part)
local parent = part.Parent
if game.Players:GetPlayerFromCharacter(parent) then
parent.Humanoid.Health = 0
end
end
while wait() do
flood.Touched:Connect(steppedOn)
end
script.Parent.Touched:Connect(function(Part)
if game.Players:GetPlayerFromCharacter(Part.Parent) then
Part.Parent:WaitForChild("Humanoid").Health = 0
end
end)
--Put your code here.