I want my Main Menu music to resume after the player dies etc. everything works fine, but I can’t play the Tween for the volume and the sound itself
local LMT = TweenService:create(LobbyMusic, TweenInfo.new(100), {Volume = 10})
player.CharacterAdded:Connect(function()
MainMenu:Clone().Parent = PlayerGui
LMT:Play()
LobbyMusic:Play()
end)
function Play()
if playerteam == Spectators then
PlayButton.Text ="Please Change Your Team"
ErrorSound:Play()
wait(3)
PlayButton.Text ="Play"
else
SpawnWeaponRE:FireServer()
MainMenu:Destroy()
LMT:Cancel()
LobbyMusic.Volume = 0
LobbyMusic:Stop()
ClickSound:Play()
end
end
PlayButton.MouseButton1Down:Connect(function()
Play()
end)
- I can’t cancel the tween in the Play() function
- The volume from the music isn’t changing back to 0 also