Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 26 Feb 2012 05:59 AM |
So my problem is that it sometimes works for me only and sometimes for everyone. It's just confusing. Actually, a sound should get on if I join the game or a player joins the game when I'm in-game. The sound should also turn off when I leave the game. So here's the script:
sound = game.Workspace.Sound.Music game.Players.PlayerAdded:connect(function(p) if game.Players:findFirstChild("Cheater") then sound:Stop() sound.Volume = 0 wait(1) sound:Play() while sound.Volume < 1 do sound.Volume = sound.Volume + 0.01 wait(0.1) end end end)
game.Players.PlayerAdded:connect(function(p) if p.Name == "Cheater" then sound:Stop() sound.Volume = 0 wait(1) sound:Play() while sound.Volume < 1 do sound.Volume = sound.Volume + 0.01 wait(0.1) end end end)
game.Players.PlayerRemoving:connect(function(p) if p.Name == "Cheater" then sound:Stop() end end)
|
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 26 Feb 2012 07:00 AM |
| I think nobody can answer me that question. -.- |
|
|
| Report Abuse |
|
|
TINISH0TZ
|
  |
| Joined: 20 Nov 2009 |
| Total Posts: 2549 |
|
|
| 26 Feb 2012 07:06 AM |
| Is it just you going in the game? Or are there already players in that game? |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 26 Feb 2012 07:11 AM |
| Also other players. Like I said, for me, I can see the script working fine almost everytime. And as I can hear the sound, some people don't. Also sometimes I can't hear the sound but some people do. |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
|
| 26 Feb 2012 08:20 AM |
| I was about to say what Trioxide said. :/ |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 26 Feb 2012 09:37 AM |
| rioxide how do you mean with the i,v in pairs function? (I know what it is) Just don0t get it why to use that. |
|
|
| Report Abuse |
|
|