Can't Get Sound to Play

I have a tycoon game that I want to publish in the future, but I ran into a problem with sounds when items are bought (with in game currency). I have a script that goes through every one of the buttons in a button folder, and when the player steps on them, the next dropper appears (if they have enough money that is). I want a cash sound effect to play when they step on it, so I just decided to put the cash sound effect in one of the button groups and put a play command in the script. It didn’t play for some reason. I don’t know what to do, and I really want that cash sound effect. I have tried making the sound effect parent the player, but that didn’t work. Look at the following images for more information.


V Represents the Button Groups

image

What exactly is V? I don’t see v getting defined in your provided screenshot. I know it’s defined I just want to know what V.

V refers to a group in workspace (Tycoon) then a folder called buttons, and that gets the children of all the button groups there are. The button groups have all the values, the button part, and the sound effect (as shown in the image).

Do a print(“playing sound”) after the last if statement to see if it actually runs

It prints playing sound but it is not playing the sound

The sound is not under an object. Even thought the sound is parented to a model, it has to be a child to an object thats in the 3D space of the game. I would put the Money sound in the ButtonPart, but it doesn’t matter where it’s located. It just has to be a child under an object that is being rendered in the 3D space.

I put the sound in the part and modified the script so it says v.ButtonPart.Money:Play() but it still doesn’t work.

@KeeganwBLK @mroaan @ViridianDevil
I found out what’s happening: The sound is trying to play but is being destroyed before it starts. Does anyone know a way around this?

Each V is a Button Group

The button group named “Cash Sound” has the Cash Sound Effect in it.

Script to Play Sound Effect and Make Next Dropper Appear

How Do I Get the Sound Effect to Play?

Thanks for reading!

-noobface