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: What is happening?

Previous Thread :: Next Thread 
Cosmoit is not online. 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 is not online. 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 is not online. Cosmoit
Joined: 16 Oct 2011
Total Posts: 1044
23 Nov 2013 12:38 PM
b1
Report Abuse
Cosmoit is not online. Cosmoit
Joined: 16 Oct 2011
Total Posts: 1044
23 Nov 2013 12:43 PM
b2
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