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
 

WOuld this work?Sound

Previous Thread :: Next Thread 
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
26 Jul 2011 12:05 PM
while true do
s = Instance.new("Sound")
s.Name = "Sound"
s.SoundId = ""--Don't have the name yet
s.Looped = true
s.archivable = true
s.Volume = 1
s.Parent = Workspace
wait(60)
s:Play()
wait(20)
s:Remove()
end

I don't know if that will work because when I say s:Remove() I think it might remove it forever so Thats why I'm asking you guys.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
26 Jul 2011 12:18 PM
Anyone?Please?WOuld it work
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
26 Jul 2011 12:25 PM
while true do
s = Instance.new("Sound")
s.Name = "Sound"
s.SoundId = ""--Don't have the name yet
s.Looped = true
s.Parent = Workspace
wait(60)
s:Play()
wait(20)
s:Stop()
end

I removed the volume/archivable because if it's being
instanced in game it wouldn't need to be true.
Volume is automaticly set to 1.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
26 Jul 2011 12:27 PM
Wait...

"I don't know if that will work because when I say s:Remove() I think it might remove it forever so Thats why I'm asking you guys."

If it's while true do it wouldn't matter.
It will work a bit smoother like this.

local s = Instance.new("Sound")
s.Name = "Sound"
s.SoundId = ""--Don't have the name yet
s.Looped = true
s.Parent = Workspace
while true do
wait(60)
s:Play()
wait(20)
s:Stop()
end
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
26 Jul 2011 12:28 PM
Ok, so MY SCRIPT all I had to do is instead of saying s:Remove() I can just say s:Stop?
Report Abuse
Megamatrixdude is not online. Megamatrixdude
Joined: 06 Dec 2009
Total Posts: 10939
26 Jul 2011 12:31 PM
local s = Instance.new("Sound", Workspace).SoundId = ""
s.Looped = true
while wait(60) do
s:Play()
wait(20)
s:Stop()
end

That's about as efficient as it gets. If it doesn't work, put the soundId part as it is shown in previous versions.

-My hand is a dolphin
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
26 Jul 2011 12:31 PM
...
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
26 Jul 2011 12:32 PM
Mega, your version errors. Check it. NOW.
Report Abuse
Megamatrixdude is not online. Megamatrixdude
Joined: 06 Dec 2009
Total Posts: 10939
26 Jul 2011 12:32 PM
Like I said...

-My hand is a dolphin
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
26 Jul 2011 12:33 PM
unexpected symbol near '='
Report Abuse
Megamatrixdude is not online. Megamatrixdude
Joined: 06 Dec 2009
Total Posts: 10939
26 Jul 2011 12:33 PM
Use this:

local s = Instance.new("Sound", Workspace)
s.SoundId = ""
s.Looped = true
while wait(60) do
s:Play()
wait(20)
s:Stop()
end


-My hand is a dolphin
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