-
What do you want to achieve?
I want my SurfaceGUI to display what music is currently playing, and fixing my Mute Script. -
What is the issue?
The issue is that whenever a music players, the surface gui text doesn’t change. And my Mute Script is not working. -
What solutions have you tried so far?
I haven’t found any solutions
This is my Jukebox
You can see the “Label” thats the surfacegui.
This is the surfacegui on the explorer.
This is the script that displays the music vvv (Local Script)
local textLabel = script.Parent
local currentTrack = game.ReplicatedStorage.CurrentTrack
if currentTrack.Value == "..." then
textLabel.Text = currentTrack.Value
else
textLabel.Text = "Now Playing: " .. currentTrack.Value
end
currentTrack:GetPropertyChangedSignal("Value"):Connect(function()
if currentTrack.Value == "..." then
textLabel.Text = currentTrack.Value
else
textLabel.Text = "Now Playing: " .. currentTrack.Value
end
end)
This is my Mute script (Local Script)
local musicFolder = game.ReplicatedStorage.Music
local currentTrack = game.ReplicatedStorage.CurrentTrack
local muted = false
muteButton.MouseClick:Connect(function()
local nowPlaying = musicFolder[currentTrack.Value]
nowPlaying.Volume = muted and 0.5 or 0
muted = not muted
end)
currentTrack:GetPropertyChangedSignal("Value"):Connect(function()
local nowPlaying = musicFolder[currentTrack.Value]
if muted == true then
nowPlaying.Volume = 0
elseif muted == false then
nowPlaying.Volume = 0.5
end
end)
Im confused why it doesn’t work because it doesn’t show any errors in Output tab. If you have a solution to fix this i will appreciate it.
Also i followed a tutorial on youtube how to make this, then i want to implement it on SurfaceGUIs.