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

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

Asked by 5 years ago
Edited by User#24403 5 years ago
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

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. iiBuilder_Boy 27 — 5y

1 answer

Log in to vote
-1
Answered by 5 years ago
Edited 5 years ago

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.

Ad

Answer this question