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: While true do?

Previous Thread :: Next Thread 
IntelligentBeing is not online. IntelligentBeing
Joined: 11 Jul 2013
Total Posts: 523
15 Apr 2014 04:14 PM
CurrentRange = script.Parent.Light.Range

while true do
wait(0.08)
light.Range = CurrentRange - 0.10

end

It seems to only subtract the pointlights range by 0.10
Report Abuse
IntelligentBeing is not online. IntelligentBeing
Joined: 11 Jul 2013
Total Posts: 523
15 Apr 2014 04:15 PM
Only ONCE.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
15 Apr 2014 04:16 PM
while true do
wait(.08)
light.Range = CurrentRange-.10
CurrentRange = light.Range
end
Report Abuse
SoulStealer9875 is not online. SoulStealer9875
Joined: 20 Jul 2009
Total Posts: 13119
15 Apr 2014 04:16 PM
CurrentRange needs to be redefined within the loop.

Example,

CurrentRange = 1
while true do
wait(0.08)
light.Range = 1 - 0.1
end

Every 0.08 ticks, the calculation (1-0.1) is being made and the Range property is being updated to that, 0.9.
Report Abuse
IntelligentBeing is not online. IntelligentBeing
Joined: 11 Jul 2013
Total Posts: 523
15 Apr 2014 04:22 PM
Wow, I'm an idiot, thanks for your help!
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