|
Okay I'm trying to make a sound script for instance a ceiling fan in real life HAS sound right you move away form it the sound fades and this script I made does that with sounds any sound and don't say oh try a different sound NO thats not the problem. The sound has roll off effects from the sound service I put a script in a brick called Music it will loop and play the osund and fade away if you move away from the brick but only in EDIT MODE but the sound won't play in PLAY MODE A.K.A online and I can't figure out why. Here is the script if you wan't to see what I'm talking about put the script layout into a script in a brick called Music and test it for youreselfs and try and fix it please.
local s = Instance.new("Sound")
s.Name = "Sound"
s.SoundId = "" --This is where I put the sound link
s.Volume = 1
s.Pitch= 0.8
s.Looped = true
s.archivable = false
s.Parent = game.Workspace.Music
wait(1)
s:play() |
|
|
Oh and don't say try removing s.archivable = false it won't matter if I do or not.
|
|
ZarciusJoin Date: 2007-12-08 Post Count: 3024 |
Wait... Why didn't you just bump your old thread? |
|
|
Cause I wan't people to see what I'm talking about better if not test it for themselves just don't test the sound in EDIT it works on that but then go in PLAY mode it doesn't work. |
|
|
|
|
Master753Join Date: 2008-07-04 Post Count: 8540 |
I'm not sure sounds work anymore. If you try to play music it will say in the output "Could not find blah blah blah..." |
|
|
|
Master753Join Date: 2008-07-04 Post Count: 8540 |
I tried that script with a sound ID and it said in the output "Could not load sound asset" |
|
|
|
|
DUDE!!! REALLY!!!! insert this...
first find the sound u need at insert it into a part(This is mini tuturial u'll have to make ur different for fading)
make a script and put it in the same part
put this inside the script
function OnTouch()
script.Parent.Sound:play()
pitch = what ever yuo want...
again what ever you want.
end
script.Parent.Touched:connect(OnTouch)
Now see make a second one of those and put it farther away so when they move away from the fan it will play a script with lower volume... Happy to help..
and when u say:
s = instance.new("Sound")
your making a sound without a realy sound it has no sound ID. :P
~builderman1171
|
|
|