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

Help with a GUI's script that plays a sound? Doesn't seem to be working correctly.

Asked by 6 years ago

So... My script allows an audio to be played whenever a mouse hover on top of it. I want a different sound to be played when you click on it. It plays the sound when you hover and click on it.

I've tried Button1Down but, it doesn't seem to really work (probably because I'm using it wrong or something)

Can anyone fix my script? Thanks! P.S. Please make it Filtering Enabled compatible.

Local Script

function MouseEnter()
script.Parent.Click:Play()
end
script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.Deploy.BackgroundTransparency = .7
wait(.1)
script.Parent.Parent.Deploy.BackgroundTransparency = .5
script.Menu.Loading.Visible = true
    end)
script.Parent.MouseEnter:connect(MouseEnter)
0
oh my lack of indents i might explode hiimgoodpack 2009 — 6y
0
HAHA, just put the "script.Parent.MouseEnter:connect(MouseEnter)" above the "End)", gg greatneil80 2647 — 6y
0
What? No hiimgoodpack 2009 — 6y
0
It works, I just have difficulties shifting things around. I'm fairly new to programming, and Lua is my first coding language I'm learning. Aryosis 3 — 6y

Answer this question