generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: help need!

Previous Thread :: Next Thread 
GFXdylan is not online. 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 is not online. 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 is not online. GFXdylan
Joined: 09 Feb 2013
Total Posts: 679
08 Mar 2014 11:49 AM
than help me!!
Report Abuse
GFXdylan is not online. GFXdylan
Joined: 09 Feb 2013
Total Posts: 679
08 Mar 2014 11:55 AM
bump
Report Abuse
robocu3 is not online. 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
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
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 is not online. 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 is not online. 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
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
08 Mar 2014 11:58 AM
Was the sarcasm?
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
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 is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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 is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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 is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
08 Mar 2014 12:41 PM
Maybe another time...
Report Abuse
GFXdylan is not online. GFXdylan
Joined: 09 Feb 2013
Total Posts: 679
08 Mar 2014 12:46 PM
alright!
Report Abuse
GFXdylan is not online. 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
MarioKartAddict is not online. MarioKartAddict
Joined: 11 Nov 2009
Total Posts: 42774
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 is not online. GFXdylan
Joined: 09 Feb 2013
Total Posts: 679
08 Mar 2014 12:54 PM
bump
Report Abuse
GFXdylan is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
MarioKartAddict is not online. MarioKartAddict
Joined: 11 Nov 2009
Total Posts: 42774
08 Mar 2014 12:57 PM
remove the function IsAdmin() lol you only need the anonymous functions
Report Abuse
GFXdylan is not online. 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
MarioKartAddict is not online. MarioKartAddict
Joined: 11 Nov 2009
Total Posts: 42774
08 Mar 2014 01:01 PM
stop removing the do
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image