This one is supposed to open a gate:
local gate = script.Parent
Game.Players.PlayerAdded:connect(function(plr)
if plr:GetRankInGroup(947529) == 14 then
plr.Chatted:connect(function(msg)
if msg == ":Close:" then
for i=1, 22.5, 1 do
gate.Position = gate.Position - Vector3.new(0,0.4,0)
wait(0.1)
end
end
end)
end
end)
.................................... This one opens it:
local gate = script.Parent
Game.Players.PlayerAdded:connect(function(plr)
if plr:GetRankInGroup(947529) == 14 then
plr.Chatted:connect(function(msg)
if msg == ":Open:" then
for i=1, 22.5, 1 do
gate.Position = gate.Position + Vector3.new(0,0.4,0)
wait(0.1)
end
end
end)
end
end)
...................................... This one opens a different gate, waits 5 seconds, then closes it:
local gate = script.Parent
Game.Players.PlayerAdded:connect(function(plr)
if plr:GetRankInGroup(947529) == 14 then
plr.Chatted:connect(function(msg)
if msg == ":Passway:" then
for i=1, 22.5, 1 do
gate.Position = gate.Position + Vector3.new(0,0.4,0)
wait(0.1)
wait(5)
for i=1, 22.5, 1 do
gate.Position = gate.Position - Vector3.new(0,0.4,0)
wait(0.1)
end
end
end
end)
end
end)
None of them work...so please help! Thanks

1 comment
I tried that....it still won't move...