I was revising the old Rocket Boots from the original SFOTH and was making it so that the sound it plays when used can be heard by everyone near the player vs only the playing using the boots. I made a script that plays a sound once the BodyVelocity is added to the users torso, although it doesn't seem to do anything nor give me any errors, here's the script:
function PlayIfAdded(BV) if BV.ClassName == "BodyVelocity" then local Sound = Instance.new("Sound",script.Parent.Parent.Torso) Sound.SoundId = "rbxasset://sounds\\Rocket whoosh 01.wav" Sound.Volume = .75 Sound.Name = "RocketSound" Sound:Play() end end function StopIfRemoved(BV2) if BV2.ClassName == "BodyVelocity" then if script.Parent.Parent.Torso:FindFirstChild("RocketSound") ~= nil then script.Parent.Parent.Torso.RocketSound:Destroy() end end end script.Parent.Parent.Torso.ChildAdded:Connect(PlayIfAdded) script.Parent.Parent.Torso.ChildRemoved:Connect(StopIfRemoved)
Edit: The main problem now is that it won't add the sound to the player's torso.
2nd Edit to explain a bit more:
The rocket boots don't have a handle, and I turned RequiresHandle off. This script I'm showing here is normally disabled, but it gets enabled once you equip the tool, and disabled once you unequip it. The main flying script is local, and this script (as well as the enable/disable script) isn't. Although every other part of the boots work fine, it just won't add the sound to the torso.
You never call :Play() on the audio object.
I think what's wrong with your script is the amount of spaces that are in your ID