|
| 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 |
|
|
| |
|
|
| 20 Sep 2011 03:15 PM |
| can you write it out for me? (the fixed script) |
|
|
| Report Abuse |
|
|
|
| 20 Sep 2011 03:17 PM |
| just add 2 ends right before the connection line. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|