I'm trying to experiment around with different kinds of damaging bricks, but I don't know how to make the script detect if the player is outside of the brick, thus the script will keep doing the code that runs to attempt to detect player movement, both inside and outside.
Script inside brick:
script.Parent.Touched:Connect(function(hit) local hum = hit.Parent:WaitForChild("Humanoid") hum.Running:Connect(function(spd) if spd == 0 then print("no damage") else print("damage") end end) end)