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: Broken script? But it worked before.

Previous Thread :: Next Thread 
snowwater5 is not online. snowwater5
Joined: 20 Apr 2012
Total Posts: 342
24 Jul 2014 09:16 AM
It worked with other sounds. But not this script. ITS A COPY OF IT!

function onTouch(part)

game.Workspace.Wind.Volume = 0.9
wait(0.2)
game.Workspace.Wind.Volume = 0.8
wait(0.2)
game.Workspace.Wind.Volume = 0.7
wait(0.2)
game.Workspace.Wind.Volume = 0.6
wait(0.2)
game.Workspace.Wind.Volume = 0.5
wait(0.2)
game.Workspace.Wind.Volume = 0.4
wait(0.2)
game.Workspace.Wind.Volume = 0.3
wait(0.2)
game.Workspace.Wind.Volume = 0.2
wait(0.2)
game.Workspace.Wind.Volume = 0.1
wait(0.2)
game.Workspace.Wind.Volume = 0
game.Workspace.Shop:Play()
game.Workspace.Wind:Stop()
wait(0.2)
game.Workspace.Shop.Volume = 0.1
wait(0.2)
game.Workspace.Shop.Volume = 0.2
wait(0.2)
game.Workspace.Shop.Volume = 0.3
wait(0.2)
game.Workspace.Shop.Volume = 0.4
wait(0.2)
game.Workspace.Shop.Volume = 0.5
wait(0.2)
game.Workspace.Shop.Volume = 0.6
wait(0.2)
game.Workspace.Shop.Volume = 0.7
wait(0.2)
game.Workspace.Shop.Volume = 0.8
wait(0.2)
game.Workspace.Shop.Volume = 0.9
wait(0.2)
game.Workspace.Shop.Volume = 1
script.Parent.Wind.Disabled = false
script.Disabled = true
end

game.Workspace.SoundChangeSnowOne.Touched:connect(onTouch)

script 2:

function onTouch(part)

game.Workspace.Shop.Volume = 0.9
wait(0.2)
game.Workspace.Shop.Volume = 0.8
wait(0.2)
game.Workspace.Shop.Volume = 0.7
wait(0.2)
game.Workspace.Shop.Volume = 0.6
wait(0.2)
game.Workspace.Shop.Volume = 0.5
wait(0.2)
game.Workspace.Shop.Volume = 0.4
wait(0.2)
game.Workspace.Shop.Volume = 0.3
wait(0.2)
game.Workspace.Shop.Volume = 0.2
wait(0.2)
game.Workspace.Shop.Volume = 0.1
wait(0.2)
game.Workspace.Shop.Volume = 0
game.Workspace.Wind:Play()
game.Workspace.Shop:Stop()
wait(0.2)
game.Workspace.Wind.Volume = 0.1
wait(0.2)
game.Workspace.Wind.Volume = 0.2
wait(0.2)
game.Workspace.Wind.Volume = 0.3
wait(0.2)
game.Workspace.Wind.Volume = 0.4
wait(0.2)
game.Workspace.Wind.Volume = 0.5
wait(0.2)
game.Workspace.Wind.Volume = 0.6
wait(0.2)
game.Workspace.Wind.Volume = 0.7
wait(0.2)
game.Workspace.Wind.Volume = 0.8
wait(0.2)
game.Workspace.Wind.Volume = 0.9
wait(0.2)
game.Workspace.Wind.Volume = 1
script.Parent.Shop.Disabled = false
script.Disabled = true

end

game.Workspace.SoundChangeSnowOne.Touched:connect(onTouch)


Anyone know why? Thanks in advance if you do know

-snow
Report Abuse
micke3212 is not online. micke3212
Joined: 24 Nov 2009
Total Posts: 3000
24 Jul 2014 09:18 AM
Instead of having that really long line of code just do this:

function run()
wait(.2)
game.Workspace.Wind.Volume = game.Workspace.Wind.Volume+.1
end

function OnTouched(hit)
repeat run() until game.Workspace.Wind.Volume == 1
run()
end
Report Abuse
snowwater5 is not online. snowwater5
Joined: 20 Apr 2012
Total Posts: 342
24 Jul 2014 09:29 AM
k
Report Abuse
michaeldylano is not online. michaeldylano
Joined: 08 Nov 2010
Total Posts: 1815
24 Jul 2014 10:37 AM
play() and stop() dont have capitals, and dont use dots.
sound:play()
sound2:play()
Report Abuse
michaeldylano is not online. michaeldylano
Joined: 08 Nov 2010
Total Posts: 1815
24 Jul 2014 10:38 AM
o, and wind (sound) cant be disabled?
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