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
 

Music script problem?

Previous Thread :: Next Thread 
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
20 Sep 2011 03:11 PM
This script isn't working and I really need help

ison = false
function pm()
local Ids = {"rbxasset://sounds/a.wav", "rbxasset://sounds/b.wav"} --enter Ids in here
local s = Instance.new("Sound")
s.Pitch = 1
s.Volume = 1
while true do
for i,v in pairs(Ids) do
s.SoundId = v
while s.IsPlaying do
wait()
if ison == true then
script.Parent.Player.Text = "Music: On!"
script.Parent.Sound:Play()
ison = false
else
script.Parent.Player.Text = "Music: Off!"
script.Parent.Sound:Stop()
ison = true
end
end
script.Parent.Player.MouseButton1Click:connect(pm)





and I get this output







e Sep 20 17:12:55 2011 - Running Script "Workspace.Player.Headphones.Handle.MusicPlayer.MusicPlayer.Main"
Tue Sep 20 17:12:55 2011 - Workspace.Player.Headphones.Handle.MusicPlayer.MusicPlayer.Main:23: 'end' expected (to close 'for' at line 8) near '< eof >'
Tue Sep 20 17:12:55 2011 - Running Script "Workspace.Player.Headphones.Handle.MusicPlayer"
Tue Sep 20 17:12:55 2011 - Running Script "Players.Player.PlayerGui.MusicPlayer.Main"
Tue Sep 20 17:12:55 2011 - Players.Player.PlayerGui.MusicPlayer.Main:23: 'end' expected (to close 'for' at line 8) near '< eof >'
Tue Sep 20 17:12:55 2011 - Music is not a valid member of ScreenGui
Tue Sep 20 17:12:55 2011 - Script "Workspace.Player.Headphones.Handle.MusicPlayer", Line 6
Tue Sep 20 17:12:55 2011 - stack end
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
20 Sep 2011 03:13 PM
your missing 2 ends
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
20 Sep 2011 03:15 PM
can you write it out for me? (the fixed script)
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
20 Sep 2011 03:17 PM
just add 2 ends right before the connection line.
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
20 Sep 2011 03:20 PM
Tue Sep 20 17:21:51 2011 - Running Script "Workspace.Player.Headphones.Handle.MusicPlayer"
Tue Sep 20 17:21:51 2011 - Music is not a valid member of ScreenGui
Tue Sep 20 17:21:51 2011 - Script "Workspace.Player.Headphones.Handle.MusicPlayer", Line 6
Tue Sep 20 17:21:51 2011 - stack end
Tue Sep 20 17:21:51 2011 - Running Script "Workspace.Player.Headphones.Handle.MusicPlayer.MusicPlayer.Main"
Tue Sep 20 17:21:51 2011 - Workspace.Player.Headphones.Handle.MusicPlayer.MusicPlayer.Main:25: 'end' expected (to close 'function' at line 2) near '< eof >'
Tue Sep 20 17:21:51 2011 - Running Script "Players.Player.PlayerGui.MusicPlayer.Main"
Tue Sep 20 17:21:51 2011 - Players.Player.PlayerGui.MusicPlayer.Main:25: 'end' expected (to close 'function' at line 2) near '< eof >'
Report Abuse
killerbolx is not online. killerbolx
Joined: 10 Sep 2009
Total Posts: 6135
20 Sep 2011 04:06 PM
BUMPY
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