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 » Scripters
Home Search
 

Re: Music only works in studio

Previous Thread :: Next Thread 
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
25 Aug 2016 09:31 AM
game.Players.PlayerAdded:connect(function(plr)
local music = Instance.new("Sound",plr)
music.Looped = true
for i,v in pairs(game.Workspace:GetChildren()) do
if string.sub(v.Name,1,#"music:"):lower() == "music:" then
v.Touched:connect(function(part)
if part and part.Parent and game.Players:GetPlayerFromCharacter(part.Parent) then
if game.Players:GetPlayerFromCharacter(part.Parent) == plr then
if music.SoundId ~= "rbxassetid://"..string.sub(v.Name,#"music:"+1) then
music:Stop()
delay(0.05,function()
music.SoundId = "rbxassetid://"..string.sub(v.Name,#"music:"+1)
music:Play()
end)
end
end
end
end)
end
end
end)

So when they touch the brick it'll play the music,
this script is located in SSS


https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=4026907 - my trade link -
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
25 Aug 2016 09:45 AM
!


https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=4026907 - my trade link -
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
25 Aug 2016 09:51 AM
!!


https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=4026907 - my trade link -
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
25 Aug 2016 10:00 AM
!!!


https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=4026907 - my trade link -
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
25 Aug 2016 10:07 AM
!!!!


https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=4026907 - my trade link -
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
25 Aug 2016 10:16 AM
!!!!!


https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=4026907 - my trade link -
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
25 Aug 2016 10:20 AM
!2


https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=4026907 - my trade link -
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
25 Aug 2016 10:23 AM
qq


https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=4026907 - my trade link -
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
25 Aug 2016 10:32 AM
!!!!!!


https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=4026907 - my trade link -
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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