idk, It seems pretty basic, but it ain't workin I keep gettin the error: touched is not a valid member of workspace :Line 9
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
script.Parent.Parent.Parent = h.Parent
script:remove()
end
end
script.Parent.Touched:connect(onTouched)

2 comments
I presume this script is inside the brick you are touching?
yeah, I don't think it really needs a debounce though