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)

2 comments

0

you can use while wait() do instead of while script do wait()

0

What are you asking?