Da555nny
|
  |
| Joined: 08 Oct 2009 |
| Total Posts: 25 |
|
|
| 17 Apr 2014 08:00 PM |
Hello. I am trying to create a script that switches sounds in a sound object by means of value switching. The sound and the script itself work fine, tested it out in solo mode on studio. However, this script seems to have a problem running on Player in a server and makes the sound that I want played to completely stay silent. Does anyone know what the problem is?
Here is an example of the script that I'm trying to make.
if Value.Value == 1 then Part.Sound.SoundId = "rbxassetid://13371337" end if Value.Value == 2 then Part.Sound.SoundId = "rbxassetid://12341234" end
If this were to be Studio, then it would work. If this were to be on Player (which I have tried), it apparently does not work. Is there something I am missing or what I need to modify? Please help me perfect this, and thank you for your help in advance. |
|
|
| Report Abuse |
|
rny
|
  |
| Joined: 26 Jul 2009 |
| Total Posts: 5079 |
|
|
| 17 Apr 2014 08:01 PM |
Why doesn't anyone use elseif?
if Value.Value == 1 then Part.Sound.SoundId = "rbxassetid://13371337" elseif Value.Value == 2 then Part.Sound.SoundId = "rbxassetid://12341234" end
|
|
|
| Report Abuse |
|
Da555nny
|
  |
| Joined: 08 Oct 2009 |
| Total Posts: 25 |
|
| |