My grapple instead freezes player in place

This script works, but it freezes the player in place. I checked and everything is unanchored.
PS it plays the falling animation.

local m = game.Players.LocalPlayer:GetMouse()
local debounce = false
m.KeyDown:connect(function(k)
	
	if k == script.Keybind.Value then
		if m.Target == nil then warn("found nothing to grappple on :(") end
		local attachment1 = Instance.new("Attachment",script.Parent.Torso)
		local attachment2 = Instance.new("Attachment",m.Target)
		local rope = Instance.new("RopeConstraint",script.Parent.Torso)
		rope.Attachment0=attachment1
		rope.Attachment1=attachment2
		rope.Visible=true
		rope.Length = 60
		while true do
			wait()
			rope.Length = rope.Length -1
		end
		
	end
end)

Fixed it, I parented the rope to humanoidrootpart.