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: Um. ??

Previous Thread :: Next Thread 
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
02 May 2015 08:17 PM
Why is this only changing one of them?

local Frames = script.Parent.Frames

for i, v in pairs(Frames:GetChildren()) do
while true do
v.SurfaceGui.Frame.BackgroundColor3 = Color3.new(math.random(), math.random(), math.random())
wait(1)
end
end
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
02 May 2015 08:21 PM
local Frames = script.Parent.Frames

while true do
for i, v in pairs(Frames:GetChildren()) do
v.SurfaceGui.Frame.BackgroundColor3 = Color3.new(math.random(), math.random(), math.random())
wait(1)
end
end

--

Yours got the first frame, and put it in an infinite loop, so it never got to the next one.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
02 May 2015 08:46 PM
while true do
for i, v in pairs(Frames:GetChildren()) do
v.SurfaceGui.Frame.BackgroundColor3 = Color3.new(math.random(), math.random(), math.random())
end
wait(1)
end
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
02 May 2015 08:49 PM
while true do
for i, v in pairs(Frames:GetChildren()) do
v.SurfaceGui.Frame.BackgroundColor3 = Color3.new(math.random(minimum number, maximum number))
end
wait(1)
end


you don't need 3 math.randoms and you need to add the minimum number it will choose and the max.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
02 May 2015 09:41 PM
"you don't need 3 math.randoms"
Wrong. Color3.new takes three arguments.

"and you need to add the minimum number it will choose and the max."
Wrong. Read the wiki, both arguments are optional - you can use 0, 1, or 2 arguments. It even works if you use 10 arguments I'm sure.
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
02 May 2015 09:43 PM
Jarod, when I used this, Nothing happened:

for i, x in pairs(game.Workspace:WaitForChild("FloorLights"):GetChildren()) do
local SurfaceGui= x:FindFirstChild("SurfaceGui")
local FrameHolder = SurfaceGui:FindFirstChild("FrameHolder")
if SurfaceGui and FrameHolder then
while true do
FrameHolder.BackgroundColor3 = Color3.new(math.random(), math.random(), math.random())
wait(1)
end
end
end

And when I used the one Amanda fixed, it lit up the colors on all of them, yes, but did they change? No.
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
02 May 2015 09:47 PM
Well, what I mean is, it changes it again from the beginning.
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