How do i make the title of a song display in a text box from this script as a screen Gui?
local looped = false
local pitch = 1
local volume = 1
local songPlayTime = 120
local nextSongPlayTime = 2
local songValues = {}
local songs = script.Parent:GetChildren()
for i,v in pairs(songs) do
if v:IsA("IntValue") and v.Name == "MusicId" then
table.insert(songValues, v.Value)
end
end
local sound = Instance.new("Sound",script.Parent)
sound.Name = "MusicPlayer"
if looped == true then
sound.Looped = true
else
sound.Looped = false
end
sound.Pitch = pitch
sound.Volume = volume
while true do
sound.SoundId = "rbxassetid://"..songValues[math.random(1,#songValues)]
sound:Play()
wait(songPlayTime)
sound:Stop()
wait(nextSongPlayTime)
end