Ok so everytime Im adding the new script to me localscript and I play to check it out it disappears! This is very frustrating for me and I have no idea what is going on. Is it my Roblox Studio or is it how im scripting. Here is my code:

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("Player Can DC")
    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("Player did not DC")

    end

end)
-- VVV Where the error is happening
script.Parent.Activated:Connect(function()
 if NEXTB == true then
       doubleclicked = true 
    wait(0.1)
    doubleclicked = false
script.Parent.Handle.Orientation = Vector3.new(-90, 0, 0)
end
end)
-- ^^^ where the error code stops

1 comment

0

Does it just disappear from the explorer as if you put a :Destroy() function in it?