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

How come this model isn't making their bricks change their properties?

local Button = script.Parent

local Bricks = game.Workspace.BrickGroup1



local ClickDetector = Instance.new("ClickDetector")

ClickDetector.Parent = Button



ClickDetector.MouseClick:Connect(function()

Bricks.InvisibleBrick.Transparency = 0.5

Bricks.InvisibleBrick.CanCollide = false

Bricks.InvisibleBrick2.Transparency = 0.5

Bricks.InvisibleBrick2.CanCollide = false
Bricks.InvisibleBrick3.Transparency = 0.5

Bricks.InvisibleBrick3.CanCollide = false

end)

When a button is clicked, several parts are supposed to change their properties. However, this doesn't work. Help?

1 answer

you cant just have MouseClick you need to specify what mouseclick you are looking for, if its the left mouse button you type MouseButton1Click instead. you also need to access the clickdetector and since it seems like u just press the part to change its properties its just script.Parent.ClickDetector.MouseButton1Click:Connect(function() this will access the clickdetector and when you click it will change the properties

1 comment

0

It says that MouseButton1Click isn't a valid member of ClickDetector.

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