I've been working on this project and I'm sooo close. My function is that when you hit the Blue button on the GUI, the Suitcase (named handle) turns to that color blue. I'm trying to use Brickcolor, but someone told me it WAS NOT Brickcolor, and to use something else, but what should I use?
local player = game.Players.LocalPlayer local bag = player.Backpack:WaitForChild("Suitcase"):WaitForChild("Handle") bag = script.Parent.Parent.Parent.Parent function onClick() bag.BrickColor = BrickColor.new("Bright blue") end script.Parent.MouseButton1Click:connect(onClick)
MouseButton1Down is for GUIs.
if script.Parent
means the tool then the code should go something like this.
local player = game.Players.LocalPlayer local bag = player.Backpack:WaitForChild("Suitcase"):WaitForChild("Handle") bag = script.Parent.Parent.Parent.Parent function onClick() bag.BrickColor = BrickColor.new("Bright blue") end script.Parent.Activated:connect(onClick)
Parts use BrickColor and other objects, such as GUIs, use Color3.