I need help with my scripting. Every time I change the orientation of the handle part in my tool to make my sword seem like its lunging or sticking out it does not go back to its normal position after the lunge ends. It keeps on changing position. Any help? I saw on reddit that you can change the handle rotation to swing but it doesnt exactly work. Heres my click function to make it swing or lunge.

local player = game.Players.LocalPlayer
   local mouse = player:GetMouse()

local B1 = false

  local doubleclicked = false

     local B2 = false

 local NEXTB = false

script.Parent.Activated:Connect(function()
    if NEXTB == false then
        B1 = true
    wait(0.1)
    B1  = false
      NEXTB = true
    print("CMON")
    wait(0.05)-- how long you want the script to wait before clicking the button again and defining it as a double click,
     NEXTB = false
    print("Aww no double click")

    end

end)
script.Parent.Activated:Connect(function()
 if NEXTB == true then
       doubleclicked = true 
    wait(0.1)
    doubleclicked = false
    -- your function
-- This is where I was going to put the lunge function! <<<<<<<<<<<<<<<
        end
end)