I’m trying to code a script where if the part is transparent it’ll play a sound.
The only issue is that I’m not good at coding thus my code doesn’t work, I know that this is an issue on my end but I can’t figure out what the issue is. Am I missing some crucial code?
“Am I missing some crucial code?”
You’re because sounds can only be played locally, and that I would recommend using SoundService.
Check when the parts transparency has been changed then use an if statement to see if the parts transparency is equal to 1, then play the sound from sound group…
The problem is that you’re only checking if the part’s Transparency is 1 when the script initially runs. The script will check the value one time and never again.
You need to check via a signal or a loop if the part’s transparency changes: