|
| 01 Apr 2014 06:38 PM |
i have a sound but all it does is play how could i fix this and make it pause?
script.Parent.MouseButton1Down:connect(function() script.Sound:Play() script.Sound:Pause() end) |
|
|
| Report Abuse |
|
|
|
| 01 Apr 2014 06:38 PM |
| or maybe i could click a separate button? |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 01 Apr 2014 06:44 PM |
Don't double post and it's not pausing because the play method is beforehand.. if you want to have a play/pause/resume button then make one button the play button with this script;
script.Parent.MouseButton1Down:connect(function()--First time clicking plays initially Sound:Play() script.Parent.MouseButton1Down:connect(function()--If it's clicked again it pauses Sound:Pause() script.Parent.MouseButton1Down:connect(function()--If clicked while paused,keeps playing Sound:Play() end)end)end) |
|
|
| Report Abuse |
|
|
|
| 01 Apr 2014 06:50 PM |
| thanks and yea it double posted so i worried i would get a spam warning |
|
|
| Report Abuse |
|
|