My scripting is this.
while true do
if game.Workspace.TrainCrashed.Value == true then
script.Parent.Playing = false
script.Parent.Parent.Nezzera.Playing = true
end
if game.Workspace.TrainCrashed.Value ~= true then
script.Parent.Playing = true
script.Parent.Parent.Nezzera.Playing = false
end
wait(0.2)
end
I have checked, TrainCrashed does change when the train crashes, and the names are correct. However, it doesn't work. The sounds do not play at all.
If you need more context, here is the hierarchy:
Soundservice has sound1 and sound2 (Nezzera) in it. Sound1 is the parent of the script in question.

1 comment
Some things ill tell you are these, try adding print statements to make sure that the if's are coming back true and that they're even running. Second, instead of doing while true do, try checking if the values changed and firing a function. [TrainCrashed.Changed:Connect(function() end)] this makes it so you can do Sound:Play() instead of playing = true.