I am making a checkpoint game and, I would like to have different music playing after the player reaches each checkpoint. I have created this script and placed it in the StaterGui so the music doesn't overlap other players progress. Here is the script so far.. I cannot figure out why this isn't working
local lvl = game.workspace:FindFirstChild("leaderstats")
if lvl.Name == 1 then script.child.1:Play()
else
script.child.1:Stop()
end
The child 1 of the script is the Sound (Music) that I want to play. I know I have some dumb mistake in this code so any help would work. Thanks

1 comment
Either way it still worked. Just change the script to fit and mix it with my script and it'll work.