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: Rainbow Dynamic Block Script

Previous Thread :: Next Thread 
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
05 Feb 2014 11:20 PM
Can someone help me with this- I'm trying to make a block that cycles through all the colors of the rainbow. How can I change this current script to be able to do that? (I assume it's pretty simple, I just don't quite get scripting)

while true do
script.Parent.Color = Color3.new( math.random(), math.random(), math.random())
wait(0.1)
end
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
05 Feb 2014 11:27 PM
Bump
Report Abuse
McGunz is not online. McGunz
Joined: 26 Dec 2011
Total Posts: 759
05 Feb 2014 11:30 PM
while true do loops the script you can pm me for the help
Report Abuse
flatline115 is not online. flatline115
Joined: 29 Jul 2013
Total Posts: 7826
05 Feb 2014 11:32 PM
while true do
wait()
new_text.TextColor3 = Color3.new( math.random(255)/255, math.random(255)/255, math.random(255)/255 )

end
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
05 Feb 2014 11:33 PM
The problem is that you're using Color3 on a part. Color3 is only a property of nonexisting items.. such as fire or a gui. Use BrickColor.random
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
05 Feb 2014 11:43 PM
The script doesn't have a problem- It succeeds at randomly changing the block's color intantly, but I'm trying to make it have a designated cycle of colors- Red, Orange, Yellow, Green, Blue, Purple- The rainbow. Sorry I should have made that a bit more clear in the post
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
05 Feb 2014 11:49 PM
Bump
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
05 Feb 2014 11:51 PM
while true do
brick.BrickColor = BrickColor.new("Bright red")
wait(5)
brick.BrickColor = BrickColor.new("Bright blue")
wait(5)
--more stuff
end

Life is potatoes to me
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
05 Feb 2014 11:52 PM
Thanks!
Report Abuse
robotmega is not online. robotmega
Joined: 16 May 2009
Total Posts: 14084
06 Feb 2014 12:05 AM
lol.
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
06 Feb 2014 12:05 AM
Colors = {
"Bright blue",
"Bright red",
"Lime green" --[[Thats a color I think? This is just examples anyway]]
}

while wait() do
for _, Color in pairs (Colors) do
script.Parent.BrickColor = BrickColor.new(Color)
wait(0.1)
end
end

--[[Hi Vurse.]]
Report Abuse
Vurse is not online. Vurse
Joined: 15 Apr 2013
Total Posts: 826
06 Feb 2014 12:07 AM
Oh thanks- I may have just made a new post for no reason hehe
Report Abuse
DragonODeath is not online. DragonODeath
Joined: 02 May 2011
Total Posts: 1252
06 Feb 2014 12:08 AM
@Goulstem
Yeah. Color3 is a property that belongs not to a part. But to GUI objects and particles.
However, Color3 can still be used to construct BrickColor
Example:
blabla.BrickColor = BrickColor.new(Color3.new(1,0,0))
or even
blabla.BrickColor = BrickColor.new(1,0,0)
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
06 Feb 2014 12:09 AM
@Dragon
Or in a mesh.
Or a block mesh to make it seem like the part can use color3
Report Abuse
DragonODeath is not online. DragonODeath
Joined: 02 May 2011
Total Posts: 1252
06 Feb 2014 12:12 AM
orly
what property of mesh is it
dun tel me its vertex color.
cuz me fat nob use vector3 for dat.
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
06 Feb 2014 12:15 AM
Huh?
Report Abuse
DragonODeath is not online. DragonODeath
Joined: 02 May 2011
Total Posts: 1252
06 Feb 2014 12:21 AM
What property of BlockMesh or SpecialMesh uses Color3?
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
06 Feb 2014 12:35 AM
"seem like the part can use color3"
Report Abuse
iYoshiFox is not online. iYoshiFox
Joined: 14 Apr 2012
Total Posts: 1058
06 Feb 2014 12:58 AM
--Just use this, I had the same problem so I made my own--

local p = script.Parent
local color = Color3.new()

coroutine.wrap(function()
while wait() do
p.Color = color
end
end)()

while wait() do
for i = 0, 200, 10 do
color = Color3.new(200/255, i/255, 0/255)
wait(0.005)
end
for i = 200, 0, -10 do
color = Color3.new(i/255, 200/255, 0/255)
wait(0.005)
end
for i = 0, 200, 10 do
color = Color3.new(0/255, 200/255, i/255)
wait(0.005)
end
for i = 200, 0, -10 do
color = Color3.new(0/255, i/255, 200/255)
wait(0.005)
end
for i = 0, 200, 10 do
color = Color3.new(i/255, 0/255, 200/255)
wait(0.005)
end
for i = 200, 0, -10 do
color = Color3.new(200/255, 0/255, i/255)
wait(0.005)
end
end
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
06 Feb 2014 02:43 AM
Two never ending loops, one reading from the other, WHY???
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
06 Feb 2014 12:35 PM
You can also get a color3 from a BrickColor

BrickColor.Color

Life is potatoes to me
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