i have been trying to make this script work for quite some time now and cant seem to get it to work. the script is supposed to damage the player who touched the brick and have a cool down so it doesent do 10 damage like every second and is a instant kill.
script.Parent.Touched:Connect(function(hit)
local human = hit:findFirstChild ("Humanoid")
if script.Parent.AttackCool.Value == true then
script.Parent.AttackCool.Value = false
human.Health = human.Health - 10
wait(.1)
script.Parent.AttackCool.Value = true
print ("dmg taken")
else
wait()
end
end)
AttackCool is a bool value in the part btw
