script.Parent.Touched:Connect(function(part)
for _, plr in ipairs(game:GetService("Players"):GetPlayers()) do
if debounce == false then
debounce = true
IsAMusic = true
if IsAMusic == true then
game.ReplicatedStorage.RandomMusic.Music1:Stop()
game.ReplicatedStorage.RandomMusic.Music2:Stop()
game.ReplicatedStorage.RandomMusic.Music3:Stop()
game.ReplicatedStorage.RandomMusic.Music4:Stop()
game.ReplicatedStorage.RandomMusic.Music5:Stop()
plr.Stats.Coins.Value = plr.Stats.Coins.Value + 7
plr.Stats.XP.Value = plr.Stats.XP.Value + 13
plr.Character.Humanoid.WalkSpeed = 16
plr.Character:SetPrimaryPartCFrame(lobbyTP.CFrame)
game.ReplicatedStorage.Winner:Play()
wait(1)
IsAMusic = false
end
debounce = false
end
end
end)
COMMUNITY QUESTION
The music w'ont stop when the player touch the part !!??
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
IsAMusic returned false on the touched event then.