How to make a tool using a string not bug

Hello everyone, I have had a problem with Roblox tool making using rope,

when I equip the tool it works fine, however when I unequip it and reequip it, it teleports me back to where I unequipped it from, I know this is because the rope was left there, but how do I make it so it doesn’t do this? Here is a video of what I mean,
robloxapp-20220124-1725134.wmv (2.9 MB)

i used rope,
thanks!