TextLabel not rendering but is present in the GUI

I’m working on a player list similar to the ones you see in the menus from Piggy, Wormy, etc. I’ve tried to make text labels show up when someone clicks Play, which sends a signal to the server, destroying their not ready status. However, when the function receives the go ahead to launch, the label does not appear, but IT IS present in the playergui. I’m so confused right now and it only renders/shows up when I click on it in Explorer.

This is also in a LocalScript. PlayerAdded/PlayerRemoving have nothing to do with it as of this moment, I’m almost certain of it. The problem is most likely a mistake in the function. The hierarchy is correct and no errors show up.

local function OnPlayerAdded(player)
	if not playerlist:FindFirstChild(player.Name) then
		repeat wait(1) until player:FindFirstChild("InMenu") == nil
		local clone = replicatedStorage:WaitForChild("PlayerLabel"):Clone()
		clone.Name = player.Name
		clone.Text = player.Name
		clone.Parent = panel:WaitForChild("PlayerList")
	end
end

for _, player in pairs(game.Players:GetPlayers()) do
	OnPlayerAdded(player)
end

game.Players.PlayerAdded:Connect(OnPlayerAdded)

game.Players.PlayerRemoving:Connect(function(player)
	if playerlist:FindFirstChild(player.Name) then
		playerlist:FindFirstChild(player.Name):Destroy()
	end
end)

The problem possibly is that you are updating the UI under StarterUI and not the specific PlayerUI

UI in StarterGUI gets cloned into players when a player joins, or when a character is re-added.

Changing it there will only change it for when players reset/refresh it.
image

2 Likes

Nope. https://i.gyazo.com/480e7ea20cb0e38a4f2f3b7a192b059c.png
https://gyazo.com/61799bfe3a81da3ccadeedaecef9b222
It’s updated in PlayerUI.

Does this mean, it works as intended after clicking on it, or that It outlines after clicking?

Just to be sure, you also have visible = true.

1 Like

Yep, visible = true. It becomes visible/rendered by the client only (contents + all) after clicking it in Explorer (Studio). This is of course not what I’m trying to achieve, as that would mean you cannot see it as a player.

I’ve done my best to re-create it in my studio. It worked fine on my end, maybe its a studio bug, maybe there is something unique in the way you have your stuff set up.
image

Sorry I’m not sure why its happening :frowning:

1 Like

Very strange. Well, thanks for your help. Hopefully someone can notice this thread and find out what my problem is, because my UIs don’t have any weird settings. Can UICorners, Gradients and Gridlayouts really influence that? Dunno.

I’ve done my best to go through strange combinations of those, so I’m fairly certain there wasn’t something there.

1 Like

Something interesting happened. When I published my place, it appeared. Very interesting. Studio bug then, thank you!

1 Like