I have this script
admin = {"madlegoman12"}
admin2 = {"getkoed"}
admin3 = {"opperblox24"}
function check(name)
for a = 1, #admin do
if admin[a] == name then
return true
end end
return false
end
function check2(name)
for b = 1, #admin2 do
if admin2[b] == name then
return true
end end
return false
end
function check3(name)
for c = 1, #admin3 do
if admin3[c] == name then
return true
end end
return false
end
function onChat(msg, recipient, speaker)
local source = string.lower(speaker.Name)
msg = string.lower(msg)
if msg == "unlockdown" then
check()
check2()
check3()
for i = 1, 60 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(-0.1,0,0)
wait()
end
end
if msg == "lockdown" then
check()
check2()
check3()
for i = 1, 60 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.1,0,0)
wait()
end
end
if msg == "up and down" then
check()
check2()
check3()
for i = 1, 60 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(-0.1,0,0)
wait()
end
wait(2)
for i = 1, 60 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.1,0,0)
wait()
end
end
end
game.Players.ChildAdded:connect(function(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChat(msg, recipient, newPlayer) end)
end)
So what it does it when getkoed,madlegoman12 (me) or opperblox24 say "lockdown" "unlockdown" or up and down" bricks move like doors, However this is supposed to work like this: The bricks only move when the three people at the top (getkoed,madlegoman12,opperblox24) say the commands (lockdown etc) But it works when anyone says it, I dont know why because My friend scripted this and he is on vacation so he can't help me. Does anyone know how I can stop it working for anyone and only me opper and getkoed? Do I add something?Also if you know and try to explain it to me, Please explain it quite simply because I'm pretty useless when it comes to scripting, All help is accepted, Thanks! |