Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can someone help me with this Script?

Can someone help me with this Script? Its pretty simple but Idk whats wrong with it. I want it to rapidly change the Brickcolor randomly. When I run it it changes it once.

lol= true

repeat
game.Workspace.Part.Color= Color3.new  (math.random)
wait()
game.Workspace.Part.Color= Color3.new  (math.random)
wait()
until lol == false

1 answer

✓ Accepted answer

Well, if you wanted to change the color randomly, you would do this:

while true do
	game.Workspace.Part.Color= Color3.new(math.random,math.random,math.random)
	wait()
	game.Workspace.Part.Color= Color3.new(math.random,math.random,math.random)
	wait()
end

Because Color3 requires 3 values, Red, Green, and Blue. Like this: Color3.new(R,G,B). But if you wanted to change the BrickColor randomly, you would do this:

while true do
	game.Workspace.Part.BrickColor= BrickColor.Random()
	wait()
	game.Workspace.Part.BrickColor= BrickColor.Random()
	wait()
end

Hope this helped!

*Note: The R, G, and B values in a Color3 range from 0 - 1. 1 being the brightest of that value, and 0 being the darkest of that value. For example, Color3.new(1,0,0) is completely red.

2 comments

0

Thanks :D but just a question whats the Difference between the Color and the BrickColor?

0

BrickColor is the list of colors you get when you change the color of a brick manually. Color is the mixture of Red, Green, and Blue

This discussion is preserved as it was. New answers, comments, and votes are closed.