GUI Placing issue on script

i have issue
what issue?

placing ui wrong parent and ui.text isn’t changing

script;

Sound:GetPropertChangedSignal("SoundId"):Connect(function()
  if Sound.SoundId ~= "" then
      local MSG = Instance.new("TextLabel",ScreenUI:WaitForChild("Audio"):WaitForChild("ScrollingFrame"))
      local UIPadding = Instance.new("UIPadding")

      --Properties:

      MSG.Name = "LogMessage"
      MSG.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
      MSG.BackgroundTransparency = 1.000
      MSG.BorderColor3 = Color3.fromRGB(30, 30, 30)
      MSG.BorderSizePixel = 0
      MSG.Size = UDim2.new(1, 0, 0, 0)
      MSG.Font = Enum.Font.SourceSansSemibold
      MSG.TextColor3 = Color3.fromRGB(255, 255, 255)
      MSG.TextSize = 20.000
      MSG.TextWrapped = true
      MSG.TextXAlignment = Enum.TextXAlignment.Left

      UIPadding.Parent = MSG
      UIPadding.PaddingLeft = UDim.new(0.0500000007, 0)
      UIPadding.PaddingRight = UDim.new(0.0500000007, 0)
      MSG.Text = tostring(Sound.SoundId).." <-- sound id, song name "..game:GetService("MarketplaceService"):GetProductInfo(Sound.SoundId, Enum.InfoType.Asset).Name
  end    
end)

Is there more code to this? Could you elaborate more on your issue?

i have this issue, i playing audio working great but textlabel placing playergui and doesnt changing text

Is the Changed event being fired? Add a print statement here:

Sound:GetPropertChangedSignal("SoundId"):Connect(function()
  print("Sound Changed Id")
  if Sound.SoundId ~= "" then

i try, but i need send this image
resim_2022-03-17_132447

oh i found another issue, not printing

Oh! Can you send the entire script? It’s hard to tell what the issue is without more of the code, it seems like something’s yielding, or the Sound isn’t the right sound

here (full function)

local function playeradded(Player)
	Player.CharacterAdded:Connect(function(Char)
		Char.ChildAdded:Connect(function(Object)
			if Object:IsA("Tool") then
				if Object:WaitForChild("Handle"):FindFirstChildOfClass("Sound") then
					local Sound = Object:WaitForChild("Handle"):FindFirstChildOfClass("Sound")
					Sound:GetPropertChangedSignal("SoundId"):Connect(function()
						print("sound changed but id idk")
						if Sound.SoundId ~= "" then
							print("sound changed but id here")
							local MSG = Instance.new("TextLabel",ScreenUI:WaitForChild("AudioLogger"):WaitForChild("ScrollingFrame"))
							local UIPadding = Instance.new("UIPadding")

							--Properties:

							MSG.Name = "message"
							MSG.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
							MSG.BackgroundTransparency = 1.000
							MSG.BorderColor3 = Color3.fromRGB(30, 30, 30)
							MSG.BorderSizePixel = 0
							MSG.Size = UDim2.new(1, 0, 0, 0)
							MSG.Font = Enum.Font.SourceSansSemibold
							MSG.TextColor3 = Color3.fromRGB(255, 255, 255)
							MSG.TextSize = 20.000
							MSG.TextWrapped = true
							MSG.TextXAlignment = Enum.TextXAlignment.Left

							UIPadding.Parent = MSG
							UIPadding.PaddingLeft = UDim.new(0.0500000007, 0)
							UIPadding.PaddingRight = UDim.new(0.0500000007, 0)
							MSG.Text = tostring(Sound.SoundId).." is logged! Song name "..game:GetService("MarketplaceService"):GetProductInfo(Sound.SoundId, Enum.InfoType.Asset).Name
						end	
					end)
				end
			end
		end)
	end)
end

This is running in a server script right? Are you changing the sound id locally?

not running in server script, not changing id only get id

Could you send me where the playeradded function is called from?

for _,player in ipairs(game:GetService("Players"):GetPlayers()) do
	coroutine.wrap(playeradded)(player)
end

from this

Alright, can you send me the structure of ScreenUI?

this is screen ui
resim_2022-03-17_133454

Alright, I meant the structure of the gui in the explorer, but, I think the issue is due to the Sound not being in the Handle. Is there any errors in the output?

no error in output, i sending explorer ui
image
oh i found main issue, placing message when player is loaded

oh my failure i forgor to delete message

Soo, is the problem solved, do you still need my help?

i need help, not creating text :rofl:

creating but soundid changing failure