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

Why doesnt the script change the gui to my desired color!?

local box = script.Parent
local prn = script.Parent.Parent
box.MouseButton1Click:Connect(function()
prn.BackgroundColor3 = Color3.new(34, 255, 0)
end)

Why does this script turn the gui yellow instead of green!?

4 comments

3

color3.new accepts numbers from 0 through 1, if you want to use numbers from 0 - 255, use Color3.fromRGB

0

ty

2

prn sounds inapropiate

0

lol

2 answers

ok swap line 4 of ur script with this:

prn.BackgroundColor3 = Color3.fromRGB(34, 255, 0)

lol did it work now?

Color3.new() ~= Color3.fromRGB() which should explain y. Also "prn" sounds inappropriate.

local box = script.Parent
local prn = script.Parent.Parent
box.MouseButton1Click:Connect(function()
prn.BackgroundColor3 = Color3.new(34/255, 255/255, 0/255)
end)

2 comments

0

oof

0

-1. You have failed to give an explanation.

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