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 » Scripters
Home Search
 

Re: Need help with TextButton

Previous Thread :: Next Thread 
EZmonkey is not online. EZmonkey
Joined: 17 Feb 2012
Total Posts: 42
22 Oct 2017 12:49 AM
Its my first time using gui's and such so I need some help. Here what I have in my workspace. (StarterGui>ScreenGui>TextButton>Script)

The only problem is, when the TextButton is clicked, the script doesn't run (And yes I have "TextButton.MouseButton1Click:connect(Check)"). I'm thinking maybe there;s something outside of the script that I am missing.


Report Abuse
SurKipper is not online. SurKipper
Joined: 25 Dec 2011
Total Posts: 435
22 Oct 2017 12:56 AM
Is it a LocalScript?
Report Abuse
EZmonkey is not online. EZmonkey
Joined: 17 Feb 2012
Total Posts: 42
22 Oct 2017 12:58 AM
No, it wasn't. I just added one in and moved the code, but it still doesn't work.


Report Abuse
Sukadia is online. Sukadia
Joined: 25 Jan 2013
Total Posts: 500
22 Oct 2017 01:03 AM
TextButton is defined as script.Parent, right?

Report Abuse
EZmonkey is not online. EZmonkey
Joined: 17 Feb 2012
Total Posts: 42
22 Oct 2017 01:06 AM
yes


Report Abuse
Sukadia is online. Sukadia
Joined: 25 Jan 2013
Total Posts: 500
22 Oct 2017 01:08 AM
Can you paste the code here? It's a bit difficult to see what you have + don't have.

Report Abuse
EZmonkey is not online. EZmonkey
Joined: 17 Feb 2012
Total Posts: 42
22 Oct 2017 01:09 AM
local TextButton = script.Parent local IsMute = false function Mute() print("Muted") game.workspace.GameMusic.Song1.Volume = 0 game.workspace.GameMusic.Song2.Volume = 0 game.workspace.GameMusic.Song3.Volume = 0 script.Parent.BackgroundColor3.new ############# IsMute = true end function UnMute() print("Unmuted") game.workspace.GameMusic.Song1.Volume = 0.5 game.workspace.GameMusic.Song2.Volume = 1 game.workspace.GameMusic.Song3.Volume = 0.5 script.Parent.BackgroundColor3.new ############# IsMute = false end function Check() if IsMute == false then Mute() else UnMute() end end TextButton.MouseButton1Click:connect(Check)
Report Abuse
Maite224 is not online. Maite224
Joined: 04 Apr 2017
Total Posts: 28
22 Oct 2017 01:10 AM
dude i think you miss something... add me i can fix that. thought
Report Abuse
EZmonkey is not online. EZmonkey
Joined: 17 Feb 2012
Total Posts: 42
22 Oct 2017 01:11 AM
Is there a better way to copy it...


Report Abuse
Maite224 is not online. Maite224
Joined: 04 Apr 2017
Total Posts: 28
22 Oct 2017 01:20 AM
i used to copy your script its an error
Report Abuse
EZmonkey is not online. EZmonkey
Joined: 17 Feb 2012
Total Posts: 42
22 Oct 2017 01:21 AM
local Button = script.Parent local IsMute = false function Mute() print("Muted") game.workspace.GameMusic.Song1.Volume = 0 game.workspace.GameMusic.Song2.Volume = 0 game.workspace.GameMusic.Song3.Volume = 0 script.Parent.BackgroundColor3.new ############# IsMute = true end function UnMute() print("Unmuted") game.workspace.GameMusic.Song1.Volume = 0.5 game.workspace.GameMusic.Song2.Volume = 1 game.workspace.GameMusic.Song3.Volume = 0.5 script.Parent.BackgroundColor3.new ############# IsMute = false end function Check() if IsMute == false then Mute() else UnMute() end end Button.MouseButton1Click:connect(Check) #code
Report Abuse
Maite224 is not online. Maite224
Joined: 04 Apr 2017
Total Posts: 28
22 Oct 2017 01:22 AM
dude add me ill fix that for free :)
Report Abuse
EZmonkey is not online. EZmonkey
Joined: 17 Feb 2012
Total Posts: 42
22 Oct 2017 01:24 AM
#code local Button = script.Parent local IsMute = false function Mute() print("Muted") game.workspace.GameMusic.Song1.Volume = 0 game.workspace.GameMusic.Song2.Volume = 0 game.workspace.GameMusic.Song3.Volume = 0 script.Parent.BackgroundColor3.new ############# IsMute = true end function UnMute() print("Unmuted") game.workspace.GameMusic.Song1.Volume = 0.5 game.workspace.GameMusic.Song2.Volume = 1 game.workspace.GameMusic.Song3.Volume = 0.5 script.Parent.BackgroundColor3.new ############# IsMute = false end function Check() if IsMute == false then Mute() else UnMute() end end Button.MouseButton1Click:connect(Check)
Report Abuse
EZmonkey is not online. EZmonkey
Joined: 17 Feb 2012
Total Posts: 42
22 Oct 2017 01:25 AM
I cant get this #code thing to work


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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