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

Hey help pls?

Asked by
Bulvyte 388 Moderation Voter
10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Hey umm can you make somehow when i click a button to open a gate i could hear a sound just idk how to put it ?

local bin = script.Parent.Parent

function onClicked()
    bin.Door01.Transparency = 1
    bin.Door01.CanCollide = false
    wait(0.1)
    bin.Door02.Transparency = 1
    bin.Door02.CanCollide = false
    wait(0.1)
    bin.Door03.Transparency = 1
    bin.Door03.CanCollide = false
    wait(0.1)
    bin.Door04.Transparency = 1
    bin.Door04.CanCollide = false
    wait(0.1)
    bin.Door05.Transparency = 1
    bin.Door05.CanCollide = false
    wait(0.1)
    bin.Door06.Transparency = 1
    bin.Door06.CanCollide = false
    wait(0.1)
    bin.Door07.Transparency = 1
    bin.Door07.CanCollide = false
    wait(0.1)
    bin.Door08.Transparency = 1
    bin.Door08.CanCollide = false
    wait(0.1)
    bin.Door09.Transparency = 1
    bin.Door09.CanCollide = false
    wait(0.1)
    bin.Door10.Transparency = 1
    bin.Door10.CanCollide = false
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

1 answer

Log in to vote
1
Answered by 10 years ago

Yeah just do a value for the sound

local Sound = script.Parent.Sound

--then in the function do Sound:Play()
0
THX! ATLEAST FIRST TIME Bulvyte 388 — 10y
1
Mhm xImmortalChaos 565 — 10y
Ad

Answer this question