--The change script while true do if script.Parent.Parent.Control.Value == true then script.Parent.Open.Disabled = true script.Parent.Close.Disabled = false end if script.Parent.Parent.Control.Value == true then script.Parent.Open.Disabled = false script.Parent.Close.Disabled = true end end
--The close script script.Parent.CanCollide = true wait(0.01) script.Parent.Mesh.Offset = Vector3.new(1,0,4.1) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(1,0,4.0) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.9) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.8) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.7) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.6) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.5) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.4) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.3) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.2) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.1) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.0) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.9) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.8) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.7) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.6) wait(0.05) script.Parent.Mesh.Offset = Vector3.new(1,0,2.5) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.4) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.3) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.2) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.1) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.0) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.9) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.8) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.7) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.6) wait(0.05) script.Parent.Mesh.Offset = Vector3.new(1,0,1.5) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.4) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.3) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.2) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.1) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.0) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.9) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.8) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.7) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.6) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.5) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.4) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.3) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.2) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.1) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(1,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.9,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.8,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.7,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.6,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.5,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.4,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.3,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.2,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.1,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0,0,0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --The open script script.Parent.Mesh.Offset = Vector3.new(0.1,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.2,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.3,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.4,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.5,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.6,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.7,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.8,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(0.9,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(1,0,0) wait(0.01) script.Parent.Mesh.Offset = Vector3.new(1,0,0.1) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.2) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.3) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.4) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.5) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.6) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.7) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.8) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,0.9) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.0) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.1) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.2) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.3) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.4) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.5) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.6) wait(0.05) script.Parent.Mesh.Offset = Vector3.new(1,0,1.7) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.8) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,1.9) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.0) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.1) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.2) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.3) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.4) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.5) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.6) wait(0.05) script.Parent.Mesh.Offset = Vector3.new(1,0,2.7) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.8) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,2.9) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.0) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.1) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.2) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.3) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.4) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.5) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.6) wait(0.05) script.Parent.Mesh.Offset = Vector3.new(1,0,3.7) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.8) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,3.9) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,4.0) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,4.1) wait(0.03) script.Parent.Mesh.Offset = Vector3.new(1,0,4.2) wait(0.03) script.Parent.CanCollide = false
After l run this few scripts and l get Roblox Studio crash, Why?
You need wait times after the "while true do". Just do this:
--The change script while true do wait() if script.Parent.Parent.Control.Value == true then script.Parent.Open.Disabled = true script.Parent.Close.Disabled = false end if script.Parent.Parent.Control.Value == true then script.Parent.Open.Disabled = false script.Parent.Close.Disabled = true end end
If the script runs without a wait time, it runs the loop infinitely and crashes the game.