This is my first time changing a SoudId with a script, and, without surprise, I got an error thrown at me:
09:51:52.437 - Workspace.Rounds:5: attempt to index global 'newid' (a number value) 09:51:52.438 - Stack Begin 09:51:52.439 - Script 'Workspace.Rounds', Line 5 - global FindEnd 09:51:52.439 - Script 'Workspace.Rounds', Line 105 - global Classic 09:51:52.440 - Script 'Workspace.Rounds', Line 200 - global ChooseRound 09:51:52.443 - Script 'Workspace.Rounds', Line 213 09:51:52.445 - Stack End
ids = {225032798,225032815,225032806,225032853,225032784,225032834,224971324}
function FindEnd()
newid = ids[math.random(1,#ids)]
game.Workspace.End.SoundId = "rbxassetid://"..newid:tostring()
end
Where in line 5 did I go wrong?

1 comment
Thanks for the explanation!