Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago
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!?

3
color3.new accepts numbers from 0 through 1, if you want to use numbers from 0 - 255, use Color3.fromRGB theking48989987 2147 — 5y
0
ty tightanfall 110 — 5y
2
prn sounds inapropiate HappyTimIsHim 652 — 5y
0
lol TheluaBanana 946 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

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.

Ad
Log in to vote
-1
Answered by 5 years ago
local box = script.Parent
local prn = script.Parent.Parent
box.MouseButton1Click:Connect(function()
prn.BackgroundColor3 = Color3.new(34/255, 255/255, 0/255)
end)
0
oof TheluaBanana 946 — 5y
0
-1. You have failed to give an explanation. User#24403 69 — 5y

Answer this question