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: How can I make this light flicker faster?

Previous Thread :: Next Thread 
wayne2018 is not online. 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
SwagCuzYolo is not online. SwagCuzYolo
Joined: 31 Oct 2013
Total Posts: 1224
29 Jan 2016 03:14 PM
no









































































wait(0.1) .........................
Report Abuse
wonderful72pike is not online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
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 is not online. 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
FireController1847 is not online. FireController1847
Joined: 17 Jan 2013
Total Posts: 1828
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
emantsevich1 is not online. emantsevich1
Joined: 01 Apr 2011
Total Posts: 374
29 Jan 2016 03:32 PM
RenderStepped
Report Abuse
iPenguinSuperTime is not online. iPenguinSuperTime
Joined: 25 Apr 2012
Total Posts: 3757
29 Jan 2016 03:33 PM


..

wait()
Report Abuse
wonderful72pike is not online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
29 Jan 2016 03:38 PM
"RenderStepped"

jesus
Report Abuse
ElectoStriking is not online. ElectoStriking
Joined: 10 May 2014
Total Posts: 1547
29 Jan 2016 03:42 PM
^
Report Abuse
CreativitiesUnity is not online. CreativitiesUnity
Joined: 08 Nov 2014
Total Posts: 1281
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
iPenguinSuperTime is not online. iPenguinSuperTime
Joined: 25 Apr 2012
Total Posts: 3757
29 Jan 2016 04:29 PM
^^^^
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
29 Jan 2016 04:34 PM
"wait(0.01)"

Trolol
Report Abuse
wayne2018 is not online. wayne2018
Joined: 04 Jun 2014
Total Posts: 2509
29 Jan 2016 05:05 PM
"wait(0.01)"
No, same speed...
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
29 Jan 2016 05:12 PM
I was just laughing at the people saying that
Report Abuse
emantsevich1 is not online. emantsevich1
Joined: 01 Apr 2011
Total Posts: 374
29 Jan 2016 05:22 PM
is renderstepped to good to use =p
Report Abuse
emantsevich1 is not online. emantsevich1
Joined: 01 Apr 2011
Total Posts: 374
29 Jan 2016 05:24 PM
... im joking btw
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
29 Jan 2016 05:25 PM
render step is every frame your screen renders. that would be visually the fastest
Report Abuse
Ikren00 is not online. 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 is not online. 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
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
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 is not online. 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
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
29 Jan 2016 09:41 PM
in a serverscript it wont work


Report Abuse
iPenguinSuperTime is not online. iPenguinSuperTime
Joined: 25 Apr 2012
Total Posts: 3757
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
xXTheRobotXx is not online. xXTheRobotXx
Joined: 05 May 2012
Total Posts: 13343
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
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
30 Jan 2016 12:08 PM
^

cringe cringe cringe cringe cringe


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