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)
I think its where you say script.Parent.Parent.Parent = h.Parent
theres an extra parent that would make it game, game is locked. so thats all you did wrong
function onTouched(part) local h = part.Parent:findFirstChild("Humanoid") if h~=nil then script.Parent.Parent = h.Parent --parent of script, parent of the parent of script is workspace script:remove() end end script.Parent.Touched:connect(onTouched)