Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Does :play()(for sounds) work in a modulescript?

Asked by
Protall 10
9 years ago

I made a custom object called "explode", and within the e:initialize method, everything works, except

self.Model.Base.Explode:play()

Model is a model cloned from lighting, self being the object,

Base is a part in Model

Explode is a sound within Base

There is no sound that plays. If "playonremove" is on, it will play after the explosion ends. I tried removing it at the start of the explosion to make it play, and that produced no sound. I tried playing it outside of the modulescript, through the script that calls the method, and nothing works. There is no output, as it doesn't break the script, the sound just doesn't play. Can modulescripts not use :play() or something?

1 answer

Log in to vote
0
Answered by 9 years ago

ModuleScripts can use :play(); they can use anything a normal script can. Does your bug lie in your custom object somewhere?

Ad

Answer this question