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

Im trying to make the bricks of a garage dissappear in a sort of fading way, how do i fix?

script.Parent.MouseButton1Click:Connect(function()
	workspace.Garage.one.Transparency = 1
		wait(1)
	workspace.Garage.two.Transparency = 1
		wait(1)
	workspace.Garage.three.Transparency = 1
		wait(1)
	workspace.Garage.four.Transparency = 1
		wait(1)
	workspace.Garage.five.Transparency = 1
		wait(1)
	workspace.Garage.six.Transparency = 1
		wait(1)
	workspace.Garage.seven.Transparency = 1
		wait(1)
	workspace.Garage.eight.Transparency = 1
		wait(1)
	workspace.Garage.nine.Transparency = 1
		wait(1)
	workspace.Garage.ten.Transparency = 1
		wait(1)
end)

i dont understand why its not working I also have in the group a click detector for the brick and a script right under the detector

1 comment

0

Any errors? Plus can you use the blue Lua button next to the C and paste in your code. So it's easier to read.

1 answer

The MouseButton1Click only works for TextButtons in GUIs. For the click detector, you have to use the following code.

script.Parent.ClickDetector.MouseClick:Connect(function()
    workspace.Garage.one.Transparency = 1
        wait(1)
    workspace.Garage.two.Transparency = 1
        wait(1)
    workspace.Garage.three.Transparency = 1
        wait(1)
    workspace.Garage.four.Transparency = 1
        wait(1)
    workspace.Garage.five.Transparency = 1
        wait(1)
    workspace.Garage.six.Transparency = 1
        wait(1)
    workspace.Garage.seven.Transparency = 1
        wait(1)
    workspace.Garage.eight.Transparency = 1
        wait(1)
    workspace.Garage.nine.Transparency = 1
        wait(1)
    workspace.Garage.ten.Transparency = 1
        wait(1)
end)

You can adjust the position of the clickdetector position is. If this helped, please accept my answer! Thanks.

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