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: Play song on enter

Previous Thread :: Next Thread 
DecryptedZ is not online. DecryptedZ
Joined: 19 Oct 2011
Total Posts: 6107
05 Jul 2014 03:06 PM
Can you make a script that when you enter the game a song starts playing and later starts fading and stops after 30 seconds has passed? I need it for an intro to the game.

The sound / song ID is 164275732

Paying 30R$ to whoever can do this. If you are not BC I'll give you something
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
05 Jul 2014 03:08 PM
Put the song in ServerStorage.

function OnPlayerAdded()
game.ServerStorage.Song:Play()
end
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
05 Jul 2014 03:09 PM
*

function onPlayerAdded()
game.ServerStorage.Sound:Play()
wait(30)
game.ServerStorage.Sound:Stop()
end
Report Abuse
NiceCoder is not online. NiceCoder
Joined: 15 Oct 2012
Total Posts: 6593
05 Jul 2014 03:10 PM
function onPlayerAdded()
--location of audio:Play()
wait(30)
--location of audio:Stop()
end

simple as
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
05 Jul 2014 03:10 PM
game.Players.PlayerAdded:connect(function(player)
game.Workspace.Sound:Play()
wait(30)
game.Worksapce.Sound:Stop()
end)

^^
Better method
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
05 Jul 2014 03:11 PM
Just use StarterGUI to hold the sound if you just want that one player to hear it.
Report Abuse
iRzPWNzr is not online. iRzPWNzr
Joined: 28 Jul 2011
Total Posts: 14
05 Jul 2014 03:16 PM
game.Players.PlayerAdded:connect(function(player)
repeat wait()until player.Character
game.Workspace.JoinSound:Play()
wait(29) --Wait isn't entirely accurate, so I do 1 second before what you want.
game.Workspace.JoinSound:Stop()--Can't remember if it's Stop:() or Pause:()
print("Done")
end)
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
05 Jul 2014 03:17 PM
Sound = Instance.new("Sound")
Sound.SoundId = "http://www.roblox.com/asset/?id=15025288"
game.Players.PlayerAdded:connect(function(Player)
Sound.Parent = Player.PlayerGui
Sound.Volume = 0.9
wait(6)
Sound.Volume = 0.6
wait(6)
Sound.Volume = 0.3
wait(3)
Sound.Parent = nil
end)
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
05 Jul 2014 03:18 PM
Sound = Instance.new("Sound")
Sound.SoundId = "http://www.roblox.com/asset/?id=15025288"
game.Players.PlayerAdded:connect(function(Player)
Sound.Parent = Player.PlayerGui
wait(1)
Sound:Play()
Sound.Volume = 0.9
wait(6)
Sound.Volume = 0.6
wait(6)
Sound.Volume = 0.3
wait(3)
Sound.Parent = nil
end)
There, fixed it.
Report Abuse
DecryptedZ is not online. DecryptedZ
Joined: 19 Oct 2011
Total Posts: 6107
05 Jul 2014 04:23 PM
When someone joins, you can hear it too. I just want it to play for 30 seconds locally and nobody else can hear it but the person who just joined.

I tried putting the song in StarterGui but I had no luck.

Help?
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
05 Jul 2014 04:32 PM
Okay, what is the name of the sound?

Report Abuse
DecryptedZ is not online. DecryptedZ
Joined: 19 Oct 2011
Total Posts: 6107
05 Jul 2014 05:11 PM
Waves is the name of the song / sound.
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
05 Jul 2014 05:22 PM
game.Players.PlayerAdded:connect(function(player)
game.PlayerGUI.Waves:Play()
wait(30)
game.Worksapce.Waves:Stop()
end)
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
05 Jul 2014 05:23 PM
Wait, ignore that, my stupid mistake.

Put it in starterGUI

game.Players.PlayerAdded:connect(function(player)
game.StarterGUI.Waves:Play()
wait(30)
game.StarterGUI.Waves:Stop()
end)
Report Abuse
DecryptedZ is not online. DecryptedZ
Joined: 19 Oct 2011
Total Posts: 6107
05 Jul 2014 06:18 PM
Put the script in StarterGui or the song?
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
05 Jul 2014 06:20 PM
Both.
Report Abuse
DecryptedZ is not online. DecryptedZ
Joined: 19 Oct 2011
Total Posts: 6107
05 Jul 2014 06:23 PM
It isn't playing the song
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