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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Dynamic Lighting math.random script help?

Previous Thread :: Next Thread 
Ariaxs is not online. Ariaxs
Joined: 27 Feb 2012
Total Posts: 637
31 May 2013 11:21 AM
Alright, I know that this is probably as simple as Lua Scripting will get but Im trying to make a random brightness/range script for dynamic lighting for a fire I made. This is what I came up with. Although it's not working may I have someone correct me on the errors I have made?

Point = game.Workspace.PointLight
while true do
wait(1)
Point.Range = math.random(8,18)
Point.Brightness = math.random(1,8)
end
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
31 May 2013 11:54 AM
Seems like you've placed the PointLight in Workspace. It needs to be a child object of a BasePart (Terrain, Part, WedgePart, CylinderPart, TrussPart ect.) to emit light.


:P Otherwise, fine... I'd put the "wait(1)" inside the while-condition. "while wait(1) do".

- As, A* pathfinding... huh, is it broken when it comes to the last node? Hrmmm... not diag.
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