Cosmoit
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 1044 |
|
|
| 23 Nov 2013 12:30 PM |
local buttonPressed = false local buttonPressedTwo = false local buttonPressedThree = false local buttonPressedFour = false local buttonPressedFive = false function onClickOne() if not buttonPressed then buttonPressed = true game.Workspace.Songs.SongOne:Play() script.Parent.SongOne.ImageButton.TextLabel.BackgroundTransparency = 0.5 repeat wait() until game.Workspace.Songs.SongOne.IsPlaying == false -- not working from here on if game.Workspace.Songs.SongOne.IsPlaying == false then buttonPressed = false wait(0.01) script.Parent.SongOne.ImageButton.TextLabel.BackgroundTransparency = 0 end end end
function onClickTwo() if not buttonPressedTwo then buttonPressedTwo = true game.Workspace.Songs.SongTwo:Play() script.Parent.SongTwo.ImageButton.TextLabel.BackgroundTransparency = 0.5 repeat wait() until game.Workspace.Songs.SongTwo.IsPlaying == false -- not working from here on if game.Workspace.Songs.SongTwo.IsPlaying == false then buttonPressedTwo = false wait(0.01) script.Parent.SongTwo.ImageButton.TextLabel.BackgroundTransparency = 0 end end end
script.Parent.SongOne.ImageButton.MouseButton1Click:connect(onClickOne)
script.Parent.SongTwo.ImageButton.MouseButton1Click:connect(onClickTwo) |
|
|
| Report Abuse |
|
|
Cosmoit
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 1044 |
|
|
| 23 Nov 2013 12:34 PM |
| not working from "repeat wait() until game.Workspace.Songs.SongOne.IsPlaying == false" on in each function |
|
|
| Report Abuse |
|
|
Cosmoit
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 1044 |
|
| |
|
Cosmoit
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 1044 |
|
| |
|