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 » Scripters
Home Search
 

Re: Help with light script

Previous Thread :: Next Thread 
zarman3402 is not online. zarman3402
Joined: 18 May 2013
Total Posts: 1449
03 Sep 2015 09:44 PM
x = 9
for i, v in pairs(game.Workspace.Runway:GetChildren()) do
if v.Name == "light"
then
for i, z in pairs(v:GetChildren()) do
if z:IsA("SpotLight") then
repeat
z.Brightness = 50000000
wait(1)
z.Brightness = 1
until x == 10
end
end
end
end

its parent is workspace. And, how can you change the color of the SpotLight too? I've been trying to do it but it gets me a color error, or it doesn't work at all. No output
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
03 Sep 2015 09:52 PM
spotLight.Color = Color3.new(0, 1, 0)

would make the spotlight's color green

Color3.new(r, g, b) takes 3 arguments. each argument is a number between 0 and 1.

for example,

Color3.new(1, 0, 0)
is completely red

Color3.new(0, 1, 0)
is completely green

Color3.new(0, 0, 1)
is completely blue

as for a spotLight's brightness, i'm not too sure what the max is for that property. the default is 1 though
Report Abuse
zarman3402 is not online. zarman3402
Joined: 18 May 2013
Total Posts: 1449
03 Sep 2015 09:54 PM
I wanted to make the spotlights color white. It's for a runway. So it would be 0,0,0. But I would like Ike more help on the flash script pls
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
03 Sep 2015 10:01 PM
just saying, Color3.new(0,0,0) would be black (not white)

white is Color3.new(1,1,1) IIRC

as for flashing the lights, you could do this

for i = 1, 5 do
wait(1)
spotLight.Enabled = false
wait(1)
spotLight.Enabled = true
end
Report Abuse
zarman3402 is not online. zarman3402
Joined: 18 May 2013
Total Posts: 1449
03 Sep 2015 10:04 PM
That is SOOO much simpler. Thanks.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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