Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Music start playing but won't stop?

Asked by 8 years ago

Music start playing for just one player but won't stop when touched a new buttom and the new one don't start. Everthing works fine but when i put the song in looped it won't stop anymore, even when i make a new button the let it stop it won't . and then for a new sound it either don't start when you touch it bc this one is still in the game. Well sorry if its a bit weird. I hope you can help!

local sound = script.Parent.Sound

script.Parent.Touched:connect(function(p)
    local human = game.Players:GetPlayerFromCharacter(p.Parent)
    if human and not human:WaitForChild("PlayerGui"):FindFirstChild("Sound") then
        local newSound = sound:Clone()
        newSound.Parent = human.PlayerGui
        newSound:Play() -- Changed to Stop() at next buttom
    end
end)

0
Uncheck the loop property, Cause the roblox sound's always loop, And the loop property makes sure it can't be stopped KenzaXI 166 — 8y
0
i know but i need it looped but after going on a new bottum this sound have to stop and start a new one.. minetrackmania 186 — 8y

Answer this question