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: Rainbow block

Previous Thread :: Next Thread 
AznD3viL is not online. AznD3viL
Joined: 25 Sep 2009
Total Posts: 26
31 Dec 2016 05:49 AM
I wanted to make a script that was just for fun cause I'm new to scripting was wondering if you could help me understand why my script isn't working.

03:47:35.300 - Workspace.Rainbowblock.Script:4: 'do' expected near 'red' <--- error line



local rainbowblock = game.Workspace.Rainbowblock


while rainbowblock.BrickColor == Really red do
rainbowblock.BrickColor == Bright yellow

wait(1)

while rainbowblock.BrickColor == Bright yellow do
rainbowblock.BrickColor == Lapis

wait(1)
while rainbowblock.BrickColor == Lapis do
rainbowblock.BrickColor == Plum

wait(1)
while rainbowblock == rainbowplum do
rainbowblock.BrickColor == Really red

end end
end end
end end

end
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
31 Dec 2016 07:03 AM
while wait(1) do
script.Parent.BrickColor = BrickColor.Random()
end

ez
Report Abuse
haskjdfsask is not online. haskjdfsask
Joined: 08 Jun 2014
Total Posts: 810
31 Dec 2016 07:12 AM
BrickColor = BrickColor.new("Really red")


When using if statements, you need two ='s
Otherwise only one =

All brickcolors must be assigned with BrickColor.new("your color here")
Report Abuse
AznD3viL is not online. AznD3viL
Joined: 25 Sep 2009
Total Posts: 26
31 Dec 2016 07:18 PM
this didn't work for me I got an error at =
Report Abuse
AznD3viL is not online. AznD3viL
Joined: 25 Sep 2009
Total Posts: 26
31 Dec 2016 07:19 PM
@gom is there anyway you can explain what script.parent means, i know it is a directory but how do you know when to use it? is the parent of the script the part?
Report Abuse
haskjdfsask is not online. haskjdfsask
Joined: 08 Jun 2014
Total Posts: 810
01 Jan 2017 12:17 AM
It's the parent of the script.

That's all.

If you were to put a script in a brick, the script.Parent of that script would be the brick
Report Abuse
coolrobertrules99 is not online. coolrobertrules99
Joined: 30 Apr 2012
Total Posts: 359
01 Jan 2017 12:41 AM

local rainbowblock = game.Workspace.Rainbowblock

while true do
game.Workspace.Rainbowblock.BrickColor = BrickColor.Random()
wait(1)
end
Report Abuse
F2PGames is not online. F2PGames
Joined: 22 Jun 2015
Total Posts: 67
01 Jan 2017 12:43 AM
@coolrobert

Why make a variable that you're not going to use?
Why overcomplicate the script at all?
Report Abuse
Quasar99 is not online. Quasar99
Joined: 21 Nov 2009
Total Posts: 9328
01 Jan 2017 12:44 AM
while wait(1) do
game.Workspace.RainbowBlock.BrickColor = BrickColor.random()
end

Report Abuse
coolrobertrules99 is not online. coolrobertrules99
Joined: 30 Apr 2012
Total Posts: 359
01 Jan 2017 12:46 AM
Sorry. I'm using a tablet with typing. Plus I just did it on the top of my mind.
Report Abuse
AznD3viL is not online. AznD3viL
Joined: 25 Sep 2009
Total Posts: 26
01 Jan 2017 08:45 PM
everyone is saying do .random but I didn't want random colors, the objective was to make it show really red, bright yellow, lapis, plum, then when it hits plum it loops back to red.
Report Abuse
newcoolman2 is not online. newcoolman2
Joined: 01 Apr 2010
Total Posts: 2637
01 Jan 2017 09:00 PM
here

local rainbowblock=game.Workspace.Rainbowblock
for i=1,math.huge do
rainbowblock.BrickColor=BrickColor.new(Color3.fromHSV((i%360)/360,1,1))
wait()
end


Report Abuse
HalfPinky456 is not online. HalfPinky456
Joined: 10 Apr 2011
Total Posts: 6236
01 Jan 2017 09:37 PM
while wait(1) do
rainbowblock.BrickColor = BrickColor.Random()
if rainbowblock.BrickColor == BrickColor.Random() then
rainbowblock.BrickColor = BrickColor.Random()
end
end

attempt to call girlfriend (a nil value) | (͠≖ ͜ʖ͠≖)👌 | nothin' like a good argument ¯\_(ツ)_/¯
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