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

Why is setting a gui's backroundcolor3 to a color3 value not working?

I am trying to make a gui text label's background color flash from white to black but it seems to not be changing my color. Here is the local script's code:

local data = script.Parent.Parent.Parent.data
local started = data.STARTED
started = false
while started == false do
	print("started")
	data.Parent.flasher.BackgroundColor3 = Color3.new(255, 255, 255)
	print(data.Parent.flasher.Parent.Parent)
	wait(0.5)
	data.Parent.flasher.BackgroundColor3 = Color3.new(0,0,0)
end

I am sure the loop is working as I added a print and that works. Update the backroundcolo3 value gets insanely multiplied

3 answers

the R, G and B components of Color3 are ranged 0-1. Do Color3.new(255/255, 255/255, 255/255)

I used to have this issue aswell, use Color3.FromRGB() it works good for this

local data = script.Parent.Parent.Parent.data
local started = data.STARTED
started = false
while started == false do
    print("started")
    data.Parent.flasher.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    print(data.Parent.flasher.Parent.Parent)
    wait(0.5)
    data.Parent.flasher.BackgroundColor3 = Color3.fromRGB(0,0,0)
end

Let me know if this helps you ~nevan

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