GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
|
| 08 Mar 2014 11:45 AM |
admins = {"GFXdylan"} --Admin names here function isAdmin(name)
game.Players.PlayerAdded:connect(function(p) if isAdmin(p.Name) then p.Chatted:connect(function(msg) if msg=="lights shutdown" then
for i,v in pairs(game.Workspace.RaiderLights:GetChildren()) do v["PointLight"].Enabled = false end
will this work? |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 08 Mar 2014 11:47 AM |
why don't you test it?
You are missing a crap load of end's, I'll say. |
|
|
| Report Abuse |
|
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
| |
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
| |
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 08 Mar 2014 11:56 AM |
lol "than help me" Firstly, you're using a table but not calling anything in it. No, it will not work. And yes, you're missing a lot of ends. -=Robo=- |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2014 11:56 AM |
experiment and with the new roblox editor, it'll tell you what is wrong with the syntax so no excuses |
|
|
| Report Abuse |
|
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
|
| 08 Mar 2014 11:57 AM |
I tried like 100 things, scripting helpers is really helpfull these days.. |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 08 Mar 2014 11:58 AM |
I already told you what you did wrong. -_- -=Robo=- |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Mar 2014 11:59 AM |
| And do realize, the first post on this was, your missing a crap load of ends. So, we did help you. Were not giving you a script because your lazy... |
|
|
| Report Abuse |
|
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
|
| 08 Mar 2014 12:08 PM |
Dude, idk how to fix this.. thats why i come here.
really helpfull these days.. back in '12 SH was helpfull.. |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2014 12:12 PM |
Guys just help him...
admins = {"GFXdylan"} --Admin names here function isAdmin(name)
game.Players.PlayerAdded:connect(function(p) for I = 1, #admins in inpairs(admins) if admins[I] == p.Name then p.Chatted:connect(function(msg) if msg=="lights shutdown" then
for i,v in pairs(game.Workspace.RaiderLights:GetChildren()) do v["PointLight"].Enabled = false end end end) end end end) end
Although I HAVE to say, that is extremely inefficient... |
|
|
| Report Abuse |
|
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
|
| 08 Mar 2014 12:29 PM |
thanks war! anyways, than what is a effecienter way? |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2014 12:35 PM |
| I'd tell you but I am getting a little bored, and I am not in the mood to write another script... But glad I helped |
|
|
| Report Abuse |
|
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
|
| 08 Mar 2014 12:40 PM |
Thanks, again! and war, if you are in good mood, could you help me with a more efficient way? |
|
|
| Report Abuse |
|
|
| |
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
| |
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
|
| 08 Mar 2014 12:47 PM |
admins = {"GFXdylan"} --Admin names here function isAdmin(name)
game.Players.PlayerAdded:connect(function(p) for I = 1, #admins in inpairs(admins) -- heres a error, it says in should be; do if admins[I] == p.Name then p.Chatted:connect(function(msg) if msg=="lights shutdown" then
for i,v in pairs(game.Workspace.RaiderLights:GetChildren()) do v["PointLight"].Enabled = false end end end) end end end) end
|
|
|
| Report Abuse |
|
|
|
| 08 Mar 2014 12:54 PM |
admins = {"GFXdylan"} --Admin names here
game.Players.PlayerAdded:connect(function(p) for I = 1, #admins in ipairs(admins) do if admins[I] == p.Name then p.Chatted:connect(function(msg) if msg=="lights shutdown" then
for i,v in pairs(game.Workspace.RaiderLights:GetChildren()) do v["PointLight"].Enabled = false end end end) end end end)
|
|
|
| Report Abuse |
|
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
| |
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
|
| 08 Mar 2014 12:55 PM |
still error,
shouldnt it be
game.Players.PlayerAdded:connect(function(p) for I = 1, #admins do ipairs(admins) do --- changed in to do if admins[I] == p.Name then p.Chatted:connect(function(msg) if msg=="lights shutdown" then
for i,v in pairs(game.Workspace.RaiderLights:GetChildren()) do v["PointLight"].Enabled = false end end end) end end end)
|
|
|
| Report Abuse |
|
|
|
| 08 Mar 2014 12:55 PM |
OPPS sorry
admins = {"GFXdylan"} --Admin names here function isAdmin(name)
game.Players.PlayerAdded:connect(function(p) for I,V in ipairs(admins) -- heres a error, it says in should be; do if admins[I] == p.Name then p.Chatted:connect(function(msg) if msg=="lights shutdown" then
for i,v in pairs(game.Workspace.RaiderLights:GetChildren()) do v["PointLight"].Enabled = false end end end) end end end) end |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2014 12:57 PM |
| remove the function IsAdmin() lol you only need the anonymous functions |
|
|
| Report Abuse |
|
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
|
| 08 Mar 2014 12:58 PM |
admins = {"GFXdylan"} --Admin names here function isAdmin(name)
game.Players.PlayerAdded:connect(function(p) for I,V in ipairs(admins) -- error fixed here if admins[I] == p.Name then -- error here now, it says do expected near if p.Chatted:connect(function(msg) if msg=="lights shutdown" then
for i,v in pairs(game.Workspace.RaiderLights:GetChildren()) do v["PointLight"].Enabled = false end end end) end end end) end |
|
|
| Report Abuse |
|
|
| |
|