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
|
  |
| Joined: 15 Apr 2013 |
| Total Posts: 826 |
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 15 Apr 2013 |
| Total Posts: 826 |
|
| |
|
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
|
  |
| Joined: 15 Apr 2013 |
| Total Posts: 826 |
|
| |
|
robotmega
|
  |
| Joined: 16 May 2009 |
| Total Posts: 14084 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 06 Feb 2014 12:21 AM |
| What property of BlockMesh or SpecialMesh uses Color3? |
|
|
| Report Abuse |
|
|
|
| 06 Feb 2014 12:35 AM |
| "seem like the part can use color3" |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 06 Feb 2014 02:43 AM |
| Two never ending loops, one reading from the other, WHY??? |
|
|
| Report Abuse |
|
|
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 |
|
|