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 » Scripters
Home Search
 

Re: This script keeps messing up!!

Previous Thread :: Next Thread 
Zevios is not online. Zevios
Joined: 14 Sep 2013
Total Posts: 504
22 Jan 2017 02:59 PM
while true do
wait(0.01)
if script.Parent.Velocity.magnitude > 0.1 then
script.Parent.Engine:Play()
script.Parent.Engine.PlaybackSpeed = 0.05 + script.Parent.Velocity.magnitude/260
else
script.Parent.Engine:Stop()
end
end



Help is very very very much appreciated I still can't get it working after 5 days of trying
Report Abuse
Rocketerkid is not online. Rocketerkid
Joined: 10 Oct 2011
Total Posts: 1237
22 Jan 2017 03:01 PM
What's happening that you're not liking?
Report Abuse
Zevios is not online. Zevios
Joined: 14 Sep 2013
Total Posts: 504
22 Jan 2017 03:03 PM
The sound doesn't active but you hear 0.1 snaps of it every 5 seconds or so
Report Abuse
Rocketerkid is not online. Rocketerkid
Joined: 10 Oct 2011
Total Posts: 1237
22 Jan 2017 03:05 PM
You're likely going to get a lot of feedback from this, but run your vehicle and make sure these numbers look right:


while true do
wait(0.01)
if script.Parent.Velocity.magnitude > 0.1 then
script.Parent.Engine:Play()
script.Parent.Engine.PlaybackSpeed = 0.05 + script.Parent.Velocity.magnitude/260
print(script.Parent.Engine.PlaybackSpeed);
else
script.Parent.Engine:Stop()
end
end
Report Abuse
Zevios is not online. Zevios
Joined: 14 Sep 2013
Total Posts: 504
22 Jan 2017 03:08 PM
AH WAIT I think the script makes the audio playback so much times that it doesn't sound. If I changed the wait to 5 seconds, the sound you can hear. BUT the property "pitch" is removed so i really don't know what to do! ## # #### playbackspeed instead
Report Abuse
Zevios is not online. Zevios
Joined: 14 Sep 2013
Total Posts: 504
22 Jan 2017 03:11 PM
while true do
wait(0.01)
if script.Parent.Velocity.magnitude > 0.1 then
script.Parent.Engine:Play()



"script.Parent.Engine:Play()"



so the audio keeps playing back itself every 0.01 second?
Report Abuse
Zevios is not online. Zevios
Joined: 14 Sep 2013
Total Posts: 504
22 Jan 2017 03:20 PM
aj
Report Abuse
Zevios is not online. Zevios
Joined: 14 Sep 2013
Total Posts: 504
22 Jan 2017 04:11 PM
plesss
Report Abuse
Zevios is not online. Zevios
Joined: 14 Sep 2013
Total Posts: 504
22 Jan 2017 04:39 PM
:/
Report Abuse
Zevios is not online. Zevios
Joined: 14 Sep 2013
Total Posts: 504
23 Jan 2017 10:50 AM
Cmon
Report Abuse
Zevios is not online. Zevios
Joined: 14 Sep 2013
Total Posts: 504
23 Jan 2017 11:11 AM
dont be shy
Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
23 Jan 2017 11:13 AM
Check if the sound is already playing. If it isn't, then play it. If it is, then don't. ############# ## a property of Sounds and returns a boolean based on whether it's playing or not.
Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
23 Jan 2017 11:13 AM
sound[Dot]Playing
Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
23 Jan 2017 11:14 AM
http://wiki.roblox.com/index.php?title=API:Class/Sound/Playing
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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