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: Help me it is easy

Previous Thread :: Next Thread 
samlambrechts is not online. samlambrechts
Joined: 22 Mar 2016
Total Posts: 47
31 Dec 2016 04:43 PM
How do you change the color of a part named 'LOL' ?



Report Abuse
UltimateRaheem is not online. UltimateRaheem
Joined: 10 Nov 2012
Total Posts: 1886
31 Dec 2016 04:49 PM
workspace.Lol.BrickColor = BrickColor.new("Really Red")


http://wiki.roblox.com
Report Abuse
samlambrechts is not online. samlambrechts
Joined: 22 Mar 2016
Total Posts: 47
31 Dec 2016 04:55 PM
thx dude



Report Abuse
UltimateRaheem is not online. UltimateRaheem
Joined: 10 Nov 2012
Total Posts: 1886
31 Dec 2016 04:59 PM
I know this isn't needed, but if you want the brick colour to change to a random one every 10 seconds, do this:

while wait(10) do
workspace.Lol.BrickColor = BrickColor.random()
end


This can be simplified to:

while wait(10) do workspace.Lol.BrickColor = BrickColor.random() end


http://wiki.roblox.com
Report Abuse
HaydenSpernato is not online. HaydenSpernato
Joined: 06 Dec 2012
Total Posts: 2004
31 Dec 2016 05:10 PM
I'd use while true do not while do
Report Abuse
HaydenSpernato is not online. HaydenSpernato
Joined: 06 Dec 2012
Total Posts: 2004
31 Dec 2016 05:11 PM
while true do
wait(time)

instead of

while wait(time) do

Idk guess it's just preference.
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
31 Dec 2016 05:33 PM
@Hayden

while wait() do is for optimization, your method is not the "better" way to do it
Report Abuse
HaydenSpernato is not online. HaydenSpernato
Joined: 06 Dec 2012
Total Posts: 2004
01 Jan 2017 12:58 PM
I never said it was ;-;
Report Abuse
UltimateRaheem is not online. UltimateRaheem
Joined: 10 Nov 2012
Total Posts: 1886
01 Jan 2017 12:59 PM
^ If a wait statement is the first line for your while loop, you can save a line by just replacing true with the wait.

But of course, it's up to personal preference.


http://wiki.roblox.com
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
01 Jan 2017 01:04 PM
both ways are fine.

however if you want the actin to end IMMEDIATELY is a condition is true and dont want to wait that 0.03333333 seconds then you can do it the latter way

while someval do
--code
wait()
end


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