OK, so here's what I wanna do.
- I have a script that loops music in a specific folder in the workspace.
- I want to make a credit label appear every time new music starts, and that shows the music name.
Issue: on line 9, I have no idea how to get the current local player, and get a label called "Music Credit Label" in the player's screen GUI
So it's easy to access all the GUI of your player if your script is in ScreenGui because you can simply write:
local label = script.Parent["Music Credit Label"]
aaannddd - DONE. We can use that label and credit the name of each music when it starts!
-- Table that stores every sound
local playlist = game.Workspace["Music Playlist"]:GetChildren()
-- Service that loads music before it starts so it doesn't lag or anything.
local contentProvider = game:GetService("ContentProvider")
-- his is where I get the problem. I simply want to get the player GUI and store it in this variable.
local credit = "I WANT TO GET PLAYERS SCREENGUI"
-- Function that shows the name of the music that just started.
local function CREDIT(music)
print("Showing credit..")
credit.Visible = true
credit.Text = 'Now playing: '..'"'..music.Name..'"'
wait(4)
credit.Visible = false
print("Hiding credit...")
end
-- For loop that loops the music.
for index, music in pairs(playlist) do
contentProvider:PreloadAsync({music})
music:Play()
CREDIT(music)
print("Now Playing: ".. music.Name)
wait(music.TimeLength)
end
ANY help would be great. It's ok if u can't help.

3 comments
if its good u must add first in starter gui then add in the starter gui screen gui and then the label or something else
Is this a local script right? So u can just do something like "game.Players.LocalPlayer.PlayerGui"
@thaylerfg No, this is a normal script. I don't know the difference between local and normal scripts yet. I am a junior scripter.