Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How come this hits the parent? How do i not let it hit the parent?

Asked by 8 years ago
function onTouch(Part)
    if Part.Parent:findFirstChild("HumanoidRootPart") ~= nil and Part.Parent.Name ~= script.Parent.Name then
    while script do wait()
        local Root = Part.Parent.HumanoidRootPart
        Root.CFrame = script.Parent.CFrame*CFrame.new(0,script.Parent.Size.Y/2,0)CFrame.Angles(math.rad(-90),0,0)
    end
end

    end
script.Parent.Touched:connect(onTouch)
0
you can use while wait() do instead of while script do wait() theCJarmy7 1293 — 8y
0
What are you asking? User#11440 120 — 8y

Answer this question