Hiya, I’m trying to make a music play/pause button, and I need some help! I’m still VERY new to scripting, and I think my main problem here is trying to determine if the audio is playing to turn it off.
track = game.ReplicatedStorage.Music.Dark.POSSIBL
script.Parent.MouseButton1Click:Connect(function()
track.Playing = true
script.Parent.MouseButton1Click:Connect(function()
if track.Playing = true then,
track.Playing = false
end
end
end)
local Track = game.ReplicatedStorage.Music.Dark.POSSIBL
script.Parent.MouseButton1Click:Connect(function()
if Track.Playing == true then
Track:Pause()
else
Track:Resume()
end
end)