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 » Scripting Helpers
Home Search
 

Re: Sound working in Studio, NOT working in Player/a server

Previous Thread :: Next Thread 
Da555nny is not online. 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 is not online. 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 is not online. Da555nny
Joined: 08 Oct 2009
Total Posts: 25
17 Apr 2014 08:02 PM
That still wont work.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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