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: Scripting Help

Previous Thread :: Next Thread 
roy1010 is not online. roy1010
Joined: 12 Nov 2008
Total Posts: 136
29 Jun 2017 12:20 AM
Is there a way to change all the bricks pointlights in a model with a script? If so how would I go about doing that? Thanks in advance
Report Abuse
MrStalking22 is not online. MrStalking22
Joined: 04 Dec 2011
Total Posts: 19
29 Jun 2017 12:30 AM
You could have a variable that connects all the pointlights but then you have to manually change it each. Like this (not a good script or anything) local Pointlight1 = ###################################### local Poointlight2 = ###################################### If "something touchedevent,mouseclick, or something" then Pointlight1.Enabled = true Pointlight2.Enabled = true
Report Abuse
MrStalking22 is not online. MrStalking22
Joined: 04 Dec 2011
Total Posts: 19
29 Jun 2017 12:31 AM
hashtags are game . workspace . model . part . partlight


Report Abuse
1pie23 is not online. 1pie23
Joined: 11 Jul 2010
Total Posts: 1865
29 Jun 2017 12:35 AM
put this in the model

for k,v in pairs(script.Parent:GetChildren()) do

if v:FindFirstChild("PointLight") then --are all named PointLight?



v.PointLight.Range = 20 -- change property here



end


end
Report Abuse
roy1010 is not online. roy1010
Joined: 12 Nov 2008
Total Posts: 136
29 Jun 2017 12:36 AM
After I acces the bricks through the script, what would be the code that would go into changing the colors of the pointlights to lets say blue and then it changing to red after 1 second?
Report Abuse
1pie23 is not online. 1pie23
Joined: 11 Jul 2010
Total Posts: 1865
29 Jun 2017 12:38 AM
for k,v in pairs(script.Parent:GetChildren()) do if v:FindFirstChild("PointLight") then --are all named PointLight? v.PointLight.Color = ########################### -- This makes it white, make the light the color you want then copy and paste the numbers that correspond in the properties. end end
Report Abuse
1pie23 is not online. 1pie23
Joined: 11 Jul 2010
Total Posts: 1865
29 Jun 2017 12:39 AM
#####'s are ###########################
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