generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Mute Button Script...It doesn't work.

Previous Thread :: Next Thread 
corncob567 is not online. corncob567
Joined: 18 Jan 2011
Total Posts: 795
05 Apr 2014 01:11 PM
local gui = script.Parent
function onButtonClicked()
if gui.Mute.Text == "Mute" then
gui.Mute.Text = "Unmute"
game.Workspace.TempleMain.Volume = 0 elseif
gui.Mute.Text == "Unmute" then
gui.Mute.Text = "Mute"
game.Workspace.TempleMain.Volume = 1
end
end
script.Parent.MouseButton1Click:connect(onButtonClicked)
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
05 Apr 2014 01:15 PM
local gui = script.Parent
function onButtonClicked()
if gui.Mute.Text == "Mute" then
gui.Mute.Text = "Unmute"
game.Workspace.TempleMain.Volume = 0
elseif gui.Mute.Text == "Unmute" then
gui.Mute.Text = "Mute"
game.Workspace.TempleMain.Volume = 1
end
end
script.Parent.MouseButton1Click:connect(onButtonClicked)

Make sure that it is a textbutton
Report Abuse
corncob567 is not online. corncob567
Joined: 18 Jan 2011
Total Posts: 795
05 Apr 2014 01:19 PM
Seems like you'd be right, but it didn't work.
Report Abuse
corncob567 is not online. corncob567
Joined: 18 Jan 2011
Total Posts: 795
05 Apr 2014 01:26 PM
local gui = script.Parent
function onButtonClicked()
if gui.Mute.Text == "Mute" then
gui.Mute.Text = "Unmute"
game.Workspace.TempleMain.Volume = 0
elseif gui.Mute.Text == "Unmute" then
gui.Mute.Text = "Mute"
game.Workspace.TempleMain.Volume = 1
end
end
script.Parent.MouseButton1Click:connect(onButtonClicked)


Why won't that work?
Report Abuse
corncob567 is not online. corncob567
Joined: 18 Jan 2011
Total Posts: 795
05 Apr 2014 05:39 PM
...
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
05 Apr 2014 05:42 PM
I bet that changing the volume of a sound won't affect it while it is playing.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
05 Apr 2014 05:43 PM
:Pause()

And,

Mousebutton1down?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image