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
 

Sound won't play in online mode

Previous Thread :: Next Thread 
killzone4000 is not online. killzone4000
Joined: 28 Jan 2009
Total Posts: 11457
30 Dec 2013 08:37 PM
I'm just using a 3 line script to play a sound that is looped, and the script removes itself. It works in edit mode when I run it, but when I save and go online mode, they don't emit sound. I've tried with the script being in the sound, then outside it.

Inside the sound

script.Parent:play()
wait(1)
script:remove()

In part emitting sound

script.Parent.Sound:play()
wait(1)
script:remove()

P.S - Any way that if someone enters an area, the sound is played? would it function and be built like non sword killing land, used in fencing?
Report Abuse
Pricm is not online. Pricm
Joined: 08 Feb 2013
Total Posts: 5391
30 Dec 2013 08:39 PM
what is script:remove()?

it is script.Parent.Sound:Remove()

and

script.Parent:Remove()
Report Abuse
BatRequiem is not online. BatRequiem
Joined: 04 Jun 2011
Total Posts: 6207
30 Dec 2013 08:39 PM
s = script.Parent.Sound
repeat wait() s:Stop() wait() s:Play() until s.IsPlaying
wait(1)
script:remove()

~God Bless~ Twitter - @Batpower54
Report Abuse
killzone4000 is not online. killzone4000
Joined: 28 Jan 2009
Total Posts: 11457
30 Dec 2013 08:40 PM
@Pric, I use script:Remove() to remove the script after the sound plays (as its already set to looped in properties)
Report Abuse
Grove537 is not online. Grove537
Joined: 05 Feb 2010
Total Posts: 3478
30 Dec 2013 08:41 PM
Online mode loads differently so the player doesn't hear the sound playing since it started playing before they entered
Report Abuse
rosie92680 is not online. rosie92680
Joined: 17 Oct 2011
Total Posts: 1511
30 Dec 2013 08:42 PM
I had this problem, and I sort of cheated to get around it, there are better ways to do it, but here is my way.
I checked the sound to change it so that it was on loop and it played when the sound was removed, this works, but unfortunately you can't change the sound id or pause it.

You can also do it with a button, that way works and you don't have to delete the sound.
Report Abuse
killzone4000 is not online. killzone4000
Joined: 28 Jan 2009
Total Posts: 11457
30 Dec 2013 08:48 PM
@Bat

The script still doesn't play the sound when in online
Report Abuse
killzone4000 is not online. killzone4000
Joined: 28 Jan 2009
Total Posts: 11457
30 Dec 2013 08:49 PM
@Rosie

So check play on remove and make it loopable?
Report Abuse
rosie92680 is not online. rosie92680
Joined: 17 Oct 2011
Total Posts: 1511
30 Dec 2013 08:49 PM
The sound is playing, just not playing in the right place.
Report Abuse
killzone4000 is not online. killzone4000
Joined: 28 Jan 2009
Total Posts: 11457
30 Dec 2013 08:53 PM
The sound I have emitting from a block, the block is anchored into place This is how it is in explorer (soundemit is the part containing script & sound

Workspace.Model.soundemit

both the script's and the sound's parent is soundemit
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