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

How can I make the color change?

Asked by 8 years ago

I've tried this so many times. Here are some links to help understand WHAT is there.

Focus: when you click on the BLUE circle, the suitcase (Handle) turns to "Electric Blue"

I've tried, looked a wiki, everything, and I just need a direct answer

bag = script.Parent.Parent.Parent

function onClick()
    bag.BrickColor = BrickColor.new("Bright blue")
end

script.Parent.MouseButton1Click:connect(onClick)

http://prntscr.com/abrfn9

http://prntscr.com/abrfrw

http://prntscr.com/abrftc

1 answer

Log in to vote
0
Answered by
Pyrondon 2089 Game Jam Winner Moderation Voter Community Moderator
8 years ago

Line 1 needs another .Parent. It's referring to a ScreenGui right now, while it should be referring to the Handle.

bag = script.Parent.Parent.Parent.Parent

function onClick()
    bag.BrickColor = BrickColor.new("Bright blue")
end

script.Parent.MouseButton1Click:connect(onClick)


Ad

Answer this question