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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: -=HELP!=-

Previous Thread :: Next Thread 
OriginalNexus is not online. OriginalNexus
Joined: 27 Oct 2008
Total Posts: 242
13 Sep 2014 05:26 PM
local Camera = game.Workspace.CurrentCamera
local Sound = script:WaitForChild("Sound")

local RobloxHasWorkingIsPlaying = false
IsPlaying
local SoundDeleteTimeForNonLooped = 1 -- set me while roblox still has non working IsPlaying

function PlaySound()
Sound.Name = "SteppedSound"
Sound.Parent = Camera
if RobloxHasWorkingIsPlaying then
Sound.Changed:connect(function(Property) if Property == "IsPlaying" and Sound.IsPlaying == false then Sound:Destroy(); script:Destroy() end end)
Sound:Play()
elseif not Sound.Looped then
game.Debris:AddItem(Sound,SoundDeleteTimeForNonLooped)
Sound:Play()
script:Destroy()
else
Sound:Play()
script:Destroy()
end
end

function Soundify()
local OldSound = Camera:FindFirstChild("SteppedSound")
if OldSound ~= nil then
if OldSound.SoundId ~= Sound.SoundId then
OldSound:Destroy()
PlaySound()
else
script:Destroy()
end
else
PlaySound()
end
end

Soundify()

This is my script im using for a certain feature on my game but how do I make it so that the sound is looped
Report Abuse
OriginalNexus is not online. OriginalNexus
Joined: 27 Oct 2008
Total Posts: 242
14 Sep 2014 05:45 AM
BUMP
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