Okay, so far I have this script. The model link is: http://www.roblox.com/First-GUI-Controlled-gate-item?id=153689396
--Made by iEternalFire. (Creator of the first GUI gate)
local trigger = script.Parent
local gate = game.Workspace.Gate
moving = false
open = false
function onClick()
if open == false and moving == false then
moving = true
script.Parent.Text = "Open Gate"
for i = 1, (gate.Size.Y * 10 + 1) do
wait()
gate.CFrame = gate.CFrame*CFrame.new(0, -0.1, 0)
end
moving = false
open = true
elseif open == true and moving == false then
moving = true
script.Parent.Text = "Close Gate"
for i = 1, (gate.Size.Y * 10 + 1) do
wait()
gate.CFrame = gate.CFrame*CFrame.new(0, 0.1, 0)
end
moving = false
open = false
end
end
script.Parent.MouseButton1Down:connect(onClick)

1 comment
How was I downvoted? I didn't request.