wayne2018
|
  |
| Joined: 04 Jun 2014 |
| Total Posts: 2509 |
|
|
| 29 Jan 2016 03:13 PM |
This script is supposed to make a light flicker but the light flickers waaaay too slow. Is there a way I can make it flicker faster?
local Light = script.Parent
Light.Brightness = 7
while true do wait(0.1) do Light.Range = math.random(2, 12) end end |
|
|
| Report Abuse |
|
|
|
| 29 Jan 2016 03:14 PM |
no
wait(0.1) ......................... |
|
|
| Report Abuse |
|
|
|
| 29 Jan 2016 03:14 PM |
local Light = script.Parent
Light.Brightness = 7
while true do wait(0.01) do Light.Range = math.random(2, 12) end end
Now it goes x10 faster |
|
|
| Report Abuse |
|
|
Plungeit
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 11733 |
|
|
| 29 Jan 2016 03:15 PM |
wait (0.1) is quite slow
try wait (0.001) |
|
|
| Report Abuse |
|
|
|
| 29 Jan 2016 03:15 PM |
Yes you can, by making the while true do wait(0.1) do into this: while true do wait(0.01) do
But you can't go faster than that.
It's just roblox, deal with it. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 29 Jan 2016 03:55 PM |
why aren't we using wait() again?
https://www.youtube.com/watch?v=EbLo9fU_3jw&feature=youtu.be&t=152 |
|
|
| Report Abuse |
|
|
| |
|
| |
|
wayne2018
|
  |
| Joined: 04 Jun 2014 |
| Total Posts: 2509 |
|
|
| 29 Jan 2016 05:05 PM |
"wait(0.01)" No, same speed... |
|
|
| Report Abuse |
|
|
|
| 29 Jan 2016 05:12 PM |
| I was just laughing at the people saying that |
|
|
| Report Abuse |
|
|
|
| 29 Jan 2016 05:22 PM |
| is renderstepped to good to use =p |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Jan 2016 05:25 PM |
| render step is every frame your screen renders. that would be visually the fastest |
|
|
| Report Abuse |
|
|
Ikren00
|
  |
| Joined: 25 May 2015 |
| Total Posts: 5 |
|
|
| 29 Jan 2016 05:32 PM |
local Light = script.Parent
Light.Brightness = 7 Powered = true
while wait() and Powered do Light.Range = math.random(2, 12) end
|
|
|
| Report Abuse |
|
|
jody7777
|
  |
| Joined: 22 Feb 2009 |
| Total Posts: 1343 |
|
|
| 29 Jan 2016 09:30 PM |
| u can't use render stepped in server scripts, if I remember |
|
|
| Report Abuse |
|
|
|
| 29 Jan 2016 09:36 PM |
Okay, all of you are idiots (well not all but whatever most of you idiots), anyway
the shortest you can wait is ~1/30th of a second, (unless you use rennderstep but lets not use that with a new scripter)
First do this
while true do wait(1/30) Light.Range = math.random(2, 12) end
|
|
|
| Report Abuse |
|
|
Darkenus
|
  |
| Joined: 17 Jul 2014 |
| Total Posts: 1997 |
|
|
| 29 Jan 2016 09:39 PM |
render stepped is the fastest - smoothest - and most awesome thing ever
great in camera manipulation
never used it in changing a light - however, i think itd work
http://wiki.roblox.com/index.php?title=API:Class/RunService/RenderStepped |
|
|
| Report Abuse |
|
|
|
| 29 Jan 2016 09:41 PM |
in a serverscript it wont work
|
|
|
| Report Abuse |
|
|
|
| 30 Jan 2016 11:38 AM |
wait()
will wait the shortest amount of time possible, which if 1/30th of a second is correct, then that's the same thing that you just did.
|
|
|
| Report Abuse |
|
|
|
| 30 Jan 2016 11:41 AM |
can't you just use renderstep from a localscript and invoke the server to change the light
|
|
|
| Report Abuse |
|
|
|
| 30 Jan 2016 12:08 PM |
^
cringe cringe cringe cringe cringe
|
|
|
| Report Abuse |
|
|