Sounds not playing

Changing the sound didn’t work and I don’t get what you mean by “try to waitforchild”

change :FindFirstChild with :WaitForChild

But that part already works just fine, it clones so that means it works.

Have you attempted to parent the sound to something other than the Attachment?

Yes, and same result. It’s something with the clone I guess? The sound itself is not moderated and it is authorized on this experience.

I doubt it has to do with the clone. Have you just uploaded it? Between the point you upload and the point it is approved, studio does not update whether or not it should play. Have you perhaps restarted studio and checked if it works?

It doesn’t have anything to do with the sound ID, I changed it to a catalog sound which is public and it still didn’t work.I also just restarted it now to check, it’s been uploaded for almost 30 minutes, it works.

I changed it from attachment to part and it works now, so it’s all good.

I recommend indexing the folder directly, like this:

hitfolder[material].Sound1:Clone()

The purpose of :FindFirstChild() is to prevent errors by checking if the object exists. But here it’s used in a way that creates an error anyway. So, indexing directly would give the same behavior, while being shorter, and also giving you a more informative error message.

1 Like

I switched it to part and it started working, I don’t need help anymore.

I saw. But, it’s still something to keep in mind when working on scripts in the future!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.