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: Why does the sound only play once?

Previous Thread :: Next Thread 
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 08:26 PM
In this CFrame door script, it's supposed to play the sound Tick for each time it repeats in "for i=1,14 do". For some reason it only plays when it is at it's original position. It moves correctly though. Could someone help?




debounce = false

function onTouch()
if debounce then return end
debounce = true
wait(0.2)
for i=1,14 do
script.Parent.CFrame = script.Parent.CFrame - Vector3.new(0, 1, 0)
script.Parent.Tick.Pitch = script.Parent.Tick.Pitch - 0.5
script.Parent.Tick:Play()
wait(0.05)
end
wait(3)
for i=1,14 do
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0, 1, 0)
script.Parent.Tick.Pitch = script.Parent.Tick.Pitch + 0.5
script.Parent.Tick:Play()
wait(0.05)
end
debounce = false
end

script.Parent.Touched:connect(onTouch)

Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 08:41 PM
Hello?
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
23 Aug 2011 08:46 PM
Probably because it isn't playing at all.

The one that's playing is probably the one in workspace, and has nothing to do with the script.

Define 'Tick'

<'+1 Post. Ujelly?'>
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
23 Aug 2011 08:47 PM
Oh, didn't see that. >.<

<'+1 Post. Ujelly?'>
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 08:49 PM
Script is inside of a Brick.
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
23 Aug 2011 08:49 PM
I'm guessing this is an elevator?
Report Abuse
litozinnamon is not online. litozinnamon
Joined: 21 Dec 2009
Total Posts: 891
23 Aug 2011 08:51 PM
try removing the line related to the sound pitch
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 09:04 PM
Not an elevator. And I need the pitch change. The sound is supposed to mimic the sound a sliding up/down metal door from Zelda OOT.
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 09:08 PM
Bump...
Report Abuse
TigerBloodd is not online. TigerBloodd
Joined: 24 Oct 2010
Total Posts: 2430
23 Aug 2011 09:23 PM
Try removing the debounce?

~ www.roblox.com/--item?id=60008124 ~
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 09:25 PM
I need the debounce so it doesnt float off into space.. it moves fine.
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 09:32 PM
Bump.
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 09:46 PM
Could someone PLEASE tell me how to fix this?
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
23 Aug 2011 09:55 PM
Maybe take the sound outside of the part and just group it with the part, being that the moving seems to be the problem.
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 10:02 PM
No I tried that, but I put another brick right infront of it and put the sound inside of it instead, because I need the range of which you can hear it is liminted. Thus meaning it needs to be in a brick. Didn't work.
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 10:03 PM
But of course I changed the directory of which the sound is in when I moved it.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
23 Aug 2011 10:06 PM


­
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 10:08 PM
Um. A blank post doesnt help..?
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
23 Aug 2011 10:24 PM
I'm sorry I didn't notice this before but you have it doing the play method inside the loop, so have it before the loop and stop after the loop.
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 10:38 PM
But it needs to play 14 times... AS the door is going up/down...
Report Abuse
litozinnamon is not online. litozinnamon
Joined: 21 Dec 2009
Total Posts: 891
23 Aug 2011 10:40 PM
output says anything?
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
23 Aug 2011 10:42 PM
Then after Wait(0.05) put

script.Parent.Tick:Stop()
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 10:44 PM
Yeaa.. I tried that too already...
Report Abuse
MrLisawsome is not online. MrLisawsome
Joined: 18 Jan 2010
Total Posts: 3606
23 Aug 2011 10:45 PM
Lit, there is no output for this script. It doesnt see it as malfunctioning for some reason.
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
23 Aug 2011 10:47 PM
Is loop true?

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