I added a loop and fixed the Chatted event and now the "end)" has a red line under it...
local gate = script.Parent
Game.Players.PlayerAdded:connect(function(plr)
if plr.Chatted:connect(function(msg)
if msg == "Open Lobby" then
if plr:GetRankInGroup(947529) >= 5 then
if gate.Position == Vector3(-2.7, 10.19, -0.3)then
for i=1, 22 do
gate.Position = gate.Position - Vector3.new(0, 0.4, 0)
wait(0.1)
gate.Position = gate.Position + Vector3.new(0,.2,0)
end
end
end
end
end
end)
local gate = script.Parent
Game.Players.PlayerAdded:connect(function(plr)
if plr.Chatted:connect(function(msg)
if msg == "Close Lobby" then
if plr:GetRankInGroup(947529) >= 3 then
if gate.Position == Vector3(-2.7, 28.19, -0.3)then
for i=1, 22 do
gate.Position = gate.Position - Vector3.new(0, 0.4, 0)
wait(0.1)
gate.Position = gate.Position + Vector3.new(0,.2,0)
wait(.1)
end
end
end
end
end
end)
