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 » Game Design
Home Search
 

Negative pitch on sound breaks sound engine

Previous Thread :: Next Thread 
Alex645ca is not online. Alex645ca
Joined: 02 Feb 2009
Total Posts: 2531
06 Mar 2015 07:34 PM
local soundIDs = {"214629567", "214630250", "214630256", "214630268", "214630269", "214630278", "214630353", "214630365", "214630384", "214630388", "214630391", "214630393", "214630828", "214630830", "214630832"}
if string.find(script.Parent.Name, "Nasire" or script.Parent.Name=="Young Nasiran") then
pitch = -(math.random(1.3*100, 1.7*100)/100)
volume = math.random(0.2*100, 0.5*100)/100
elseif string.find(script.Parent.Name, "Nasiran") then
pitch = -(math.random(0.8*100, 1.2*100)/100)
volume = math.random(0.5*100, 0.8*100)/100
end
wait(5)
while script.Parent.Humanoid.Health ~= 0 do
wait(math.random(5, 20))
local newsound = Instance.new("Sound", script.Parent:findFirstChild("Head"))
newsound.Pitch=pitch
newsound.Volume=volume
newsound.SoundId="http://www.roblox.com/asset/?id=" .. soundIDs[math.random(#soundIDs)]
newsound.Looped=true
newsound.Pitch=pitch
newsound.Volume=volume
newsound:Play()
newsound.Pitch=pitch
newsound.Volume=volume
wait(0)
newsound.Pitch=pitch
newsound.Volume=volume
newsound.Looped=false
game.Debris:AddItem(newsound, newsound.TimeLength)
end

What it's supposed to do:
Make my alien NPCs talk using reversed sounds from alexnewtron's Wheel of Fortune announcer sounds list (Placeholder until I find something better)

What it does:
Sets pitch to 0, massive lag spike, sound engine breaks (no sounds play at all)

Help? .-.
Report Abuse
Alex645ca is not online. Alex645ca
Joined: 02 Feb 2009
Total Posts: 2531
06 Mar 2015 07:39 PM
Also I haven't been on the forum in a while, the rules here say to use building helpers/scripting helpers instead for help but I don't see them on the forum list...?
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
06 Mar 2015 07:53 PM
SH and BH were merged here

the SH merge failed so go to scripters for such
Report Abuse
Alex645ca is not online. Alex645ca
Joined: 02 Feb 2009
Total Posts: 2531
07 Mar 2015 07:54 AM
Should I repost this in scripters, then?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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