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 » Club Houses » Let's Make a Deal
Home Search
 

Re: Help? [If ur good at scripting look at dis pls]

Previous Thread :: Next Thread 
2HV is not online. 2HV
Joined: 16 Jun 2012
Total Posts: 26195
27 May 2015 03:28 PM
As u can see im trying to use a intvalue inside the lighting to control if you can either see a mute button OR an unmute button

not both at once, for some reason it doesnt work

bin = script.Parent

function Click()
if game.Lighting.hi.Value == 1 then
game.Lighting.hi.Value = 2
bin.Visible = false
game.StarterGui.Unmute.TextButton.Visible = true
local c = game.ServerStorage.Music:GetChildren()
for i = 1, #c do
if (c[i].className == "Sound") then
c[i].Volume = 0
end
end
local c = game.Workspace:GetChildren()
for i = 1, #c do
if (c[i].className == "Sound") then
c[i].Volume = 0
end
end
end
end

bin.MouseButton1Click:connect(Click)

~ 2HV ||Road to Richness||Was AlacrityS||GFX Designer||R$247 ||RAP:45,260
Report Abuse
2HV is not online. 2HV
Joined: 16 Jun 2012
Total Posts: 26195
27 May 2015 03:30 PM
kay

~ 2HV ||Road to Richness||Was AlacrityS||GFX Designer||R$247 ||RAP:45,260
Report Abuse
2HV is not online. 2HV
Joined: 16 Jun 2012
Total Posts: 26195
27 May 2015 03:33 PM
eh?

~ 2HV ||Road to Richness||Was AlacrityS||GFX Designer||R$247 ||RAP:45,260
Report Abuse
2HV is not online. 2HV
Joined: 16 Jun 2012
Total Posts: 26195
27 May 2015 03:40 PM
qq y

~ 2HV ||Road to Richness||Was AlacrityS||GFX Designer||R$247 ||RAP:45,260
Report Abuse
2HV is not online. 2HV
Joined: 16 Jun 2012
Total Posts: 26195
27 May 2015 03:42 PM
rthrhrgs

~ 2HV ||Road to Richness||Was AlacrityS||GFX Designer||R$247 ||RAP:45,260
Report Abuse
2HV is not online. 2HV
Joined: 16 Jun 2012
Total Posts: 26195
27 May 2015 03:42 PM
wefwfwfw

~ 2HV ||Road to Richness||Was AlacrityS||GFX Designer||R$247 ||RAP:45,260
Report Abuse
ForeverTaIl is not online. ForeverTaIl
Joined: 10 Dec 2011
Total Posts: 114486
27 May 2015 03:48 PM
Question, do they have to click the button to switch back and forth between mute and unmute?

if so, then i have an answer
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
27 May 2015 03:49 PM
wheres the efficiency
Report Abuse
ForeverTaIl is not online. ForeverTaIl
Joined: 10 Dec 2011
Total Posts: 114486
27 May 2015 03:49 PM
button being whatever is being clicked
Report Abuse
DevTechn0 is not online. DevTechn0
Joined: 17 May 2015
Total Posts: 1625
27 May 2015 03:49 PM
at least give something on topic...
Report Abuse
Expoltion is not online. Expoltion
Joined: 29 Sep 2013
Total Posts: 15135
27 May 2015 03:51 PM
game.StarterGui.Unmute.TextButton.Visible = true

there should be a frame inside of "TextButton"
make the frame's value to visible



~ Exᴘᴏʟᴛɪᴏɴ || #GʀᴀɪɴGᴀɴɢ || GFX Dᴇsɪɢɴᴇʀ || R$17,634 || RAP: 686,861
Report Abuse
2HV is not online. 2HV
Joined: 16 Jun 2012
Total Posts: 26195
27 May 2015 03:51 PM
yeah
if u click the one that is visible at the start ( in this case the mute button ) i want this other button (unmute button) to appear and be able to do the same thing over and over

~ 2HV ||Road to Richness||Was AlacrityS||GFX Designer||R$247 ||RAP:45,250
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
27 May 2015 03:56 PM
local mutebutton = "name of mute button";
local unmutebutton = "name of unmute button";

script.Parent.MouseButton1Click:connect(function()

local mute = game.Players.LocalPlayer.PlayerGui:FindFirstChild(mutebutton);
local unmute = game.Players.LocalPlayer.PlayerGui:FindFirstChild(unmutebutton);

if(mute.Visible) then
mute.Visible = false;
unmute.Visible = true;
muteSound(workspace);
muteSound(game.ServerStorage.Music);

elseif (unmute.Visible) then
unmute.Visible = false;
mute.Visible = true;
unmuteSound(workspace);
unmuteSound(game.ServerStorage.Music);
end
end)


function muteSound(object)
for _,v in pairs(object:GetChildren()) do
if v:IsA("Sound") then
v.Volume = 0;
end
end

function unmuteSound(object)
for _,v in pairs(object:GetChildren()) do
if v:IsA("Sound") then
v.Volume = 1;
end
end
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
27 May 2015 03:57 PM
Also, you cant access serverstorage from localscripts I believe so u might want to change that

and make it a localscript in the guis
Report Abuse
ForeverTaIl is not online. ForeverTaIl
Joined: 10 Dec 2011
Total Posts: 114486
27 May 2015 04:06 PM
You're making it wayyyyy too complicated then.


Put a starter sound into game.StarterGui
Insert a button inside the Unmute ScreenGui thing
then put this script into StarterGui as well


repeat wait() until script.Parent.Parent == true

if script.Parent.Parent.Parent.Parent == true then
script.Parent.Parent.Parent.(InsertSoundHere).Parent = script.Parent.Parent
end


Now, make a new script under the button and move on with the button/anything being clicked

repeat wait() until script.Parent.Parent.Parent.Parent == true

script.Parent.MouseButton1Down:connect(function()
if script.Parent.Parent.Parent.Parent.(InsertSameSoundHere).IsPlaying == true then
script.Parent.Parent.Parent.Parent.(InsertSameSoundHere):Stop()
script.Parent.Parent.(your unmute button thing).Visible = true
script.Parent.Visible = false
elseif script.Parent.Parent.Parent.Parent.(InsertSameSoundHere).IsPlaying == false then
script.Parent.Parent.Parent.Parent.(InsertSameSoundHere):Play()
script.Parent..Visible = true
script.Parent.Parent.(your mute button thing).Visible = true
end
end)


i wrote this quickly so tell me if something's not working...


Report Abuse
ForeverTaIl is not online. ForeverTaIl
Joined: 10 Dec 2011
Total Posts: 114486
27 May 2015 04:08 PM
his way is a better

use that
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
27 May 2015 04:08 PM
yes but I put semicolons so mine is cooler!!!


and add this to it

repeat print(string.rep("yooo", 99e9)) until 2 < 1
Report Abuse
ForeverTaIl is not online. ForeverTaIl
Joined: 10 Dec 2011
Total Posts: 114486
27 May 2015 04:08 PM
By the way, if you use my way. make it a LocalScript for everything.

(Just in case you want to add stuff in later)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Let's Make a Deal
   
 
   
  • 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