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)
How I would do it:
Gates itself have bool properties Open and Moving. There would be a separate script to change their values.
Move the stuff you have in OnClick into another method called OpenGate or something.
That method would require an identifying parameter so it can know which gate to open.
Keep an array at the top of your script filled with the identifiers of the gates you want to open.
Finally, in the OnClick, iterate through the array, passing it to OpenGate on every iteration.