function onTouched(hit)
local h = hit.Parent:findFirstChild("Humanoid")
while true do
wait(1.5)
if (h ~= nil) then
h.Health = h.Health - 6
wait(1.5)
end
end
end
print("Works")
game.Workspace.F9Parent:FindFirstChild("F9").Touched:connect(onTouched)
It's suppose to hurt the player when they touch the brick, but it doesn't even print "works" in the output.
The script works with a normal part, however this brick was made with instance.new and there are many of these bricks with the same name. I can't seem to get it to work.

3 comments
:clone() is deprecated, use :Clone()
and game.workspace and game.Serverstorage is deprecated use game.Workspace and game.ServerStorage
i didnt know...