Got this script from a sliding door I found, but being me I don't know most of what is going on in the script. I just need to know how and where to change the distance the doors move apart in the script.
door = script.Parent door1 = door.Door1 door2 = door.Door2 button = door.Button isopen = door.IsOpen debounce = door.Debounce button.ClickDetector.MouseClick:connect(function() if (debounce.Value == false) then if (isopen.Value == true) then isopen.Value = false elseif (isopen.Value == false) then isopen.Value = true end button.BrickColor = BrickColor.new("Black") end end) isopen.Changed:connect(function() if (debounce.Value == false) then debounce.Value = true if (isopen.Value == true) then for i=1, 190 do door1.CFrame = door1.CFrame * CFrame.new(-0.1,0,0) door2.CFrame = door2.CFrame * CFrame.new(0.1,0,0) wait() end debounce.Value = false button.BrickColor = BrickColor.new("Bright red") return end if (isopen.Value == false) then for i=1, 190 do door1.CFrame = door1.CFrame * CFrame.new(0.1,0,0) door2.CFrame = door2.CFrame * CFrame.new(-0.1,0,0) wait() end debounce.Value = false button.BrickColor = BrickColor.new("Bright green") return end end end)
Line 24,25 and 34,35 are the lines that make the door move. You can increase the amount that they open by changing the line right above them
for i=1, 190 do
the 190, means that it will do it 190 times before it stops, if you increase that number the doors will move farther apart, if you decrease 190, it will make it so they don't move as far apart.