Quick Question about randomized ColourValue

Hello, so I am not used to scripting at all, (beginner) and I was wondering if anyone knew how I could make a randomized colour value between a certain scale for my part, ( I want to make the part flicker like a light, but with colours)

Again this is a very simple question, but I dont know much about scripting and this will really help me :slight_smile:

2 Likes

If you want to change all three values to be entirely different, thus giving you an entirely different color each time, you can use ‘math.random’ on all three values to change them.

Since I don’t know what you named your Part, I’ll call my Part MyPart and set the script to be inside the Part.

local MyPart = script.Parent

MyPart.Color = Color3.new(math.random(0, 255), math.random(0, 255), math.random(0, 255))

Okay, I tested the script and it matched what is was looking for. do you know how I can make it so the part is only randomly red? (anynumber,0,0)

you would only use math.random on red

local MyPart = script.Parent

MyPart.Color = Color3.new(math.random(0, 255), 0, 0)