ryry99
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 403 |
|
|
| 04 Sep 2012 12:13 AM |
I'm working with local sounds, which has gone successfully, and at the moment I'm making it mute-able. The only thing I'm having trouble with, is when a sound is put in the screengui to have it play, and you have the sound muted, it doesn't mute the sound. What is most confusing is the output. "Sound" is not the name of the sound I have in "screengui".
screengui.ChildAdded:connect(function(zq) print(zq:GetFullName()) if muted then print("muted") zq.Volume = 0 end end)
Output: Players.Player539.PlayerGui.screengui.Sound muted |
|
|
| Report Abuse |
|
|
ryry99
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 403 |
|
| |
|
arundel
|
  |
| Joined: 21 Apr 2008 |
| Total Posts: 5762 |
|
|
| 04 Sep 2012 10:52 AM |
"if muted then volume=0"
Isn't that just like saying if the volume is zero, make volume zero.. |
|
|
| Report Abuse |
|
|
ryry99
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 403 |
|
|
| 05 Sep 2012 10:20 AM |
| Let me explain, this is a button on the screen, when you click it, it mutes the sound. "muted" is a bool telling if it's muted or not. Let's say I mute it, all the sounds get muted. But then a new sound gets inserted into screengui. That's where this function comes in. It checks to see if it's muted, then if it is, it mutes the new sound. Although, for some reason, it doesn't work. |
|
|
| Report Abuse |
|
|
ryry99
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 403 |
|
|
| 05 Sep 2012 07:39 PM |
| It ended up working in "Play" mode. It doesn't work in "Solo" mode. Roblox these days... |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2012 08:09 PM |
| ChildAdded / PlayerAdded don't work in Solo/Build Modes |
|
|
| Report Abuse |
|
|
crusada91
|
  |
| Joined: 04 Sep 2010 |
| Total Posts: 684 |
|
|
| 05 Sep 2012 08:42 PM |
ChildAdded/PlayerAdded does work in Solo, idk about build but
i test my tycoons through test solo lol and my playerentered script worksfine to give me leaderstats |
|
|
| Report Abuse |
|
|