My killbrick script doesn't work unless you stand on it for a moment- I'm new to scripting so any help would be appreciated.
Heres the script.
function onTouched(Obj)
local h = Obj.Parent:FindFirstChild("Humanoid")
if h then
h.Health = 0
end
end
script.Parent.Touched:Connect(onTouched)

3 comments
Try printing obj, does it detect the hit?
This is not related to your question but try making the code more concise. Do script.parent.parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then end end)
Sorry for the late reply, but the solution was changing my game to R6!