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

How to change GUI colour through script?

Asked by
pevdn 32
3 years ago
script.Parent.MouseButton1Down:Connect(homeButtonClick)

function homeButtonClick ()
    script.Parent.Parent.screen.BackgroundColor3 = Color3.new(252,0,9)
end

It is not working. Every time I click the button I get: attempt to call a nil value

Any fixes?

0
would you mind showing a picture of the explorer? attempt to call a nil value usually occurs when something doesn't seem to exist NGC4637 602 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Maybe try script.Parent.Parent.screen.BackgroundColor3 = Color3.fromRBG(252,0,9)

Ad

Answer this question