Weird uiGirdLayout glitch

I’m trying to make a system that loads every player’s name into a textbutton with designated properties every time a RemoteEvent is fired. It should be working - the print is there indicating that it is.

For some reason, when I run the code, nothing happens:

it’s just an empty grid

The script looks like this, very simple:

local grid = script.Parent.Grid

	for i, v in pairs(game.Players:GetChildren()) do
		local newbutton ="TextButton", grid)
		newbutton.Name = v.Name
		newbutton.BackgroundColor3 =, 0.0784314, 0.247059)
		newbutton.TextColor3 =, 1, 1)
		newbutton.Font = Enum.Font.Bangers
		newbutton.TextTransparency = 0
		newbutton.TextColor3 =, 0, 0)
		newbutton.Text = v.Name
		print("Created your button")

In fact, it even shows the textbutton in it in PlayerGui when I run the game. All visible Booleans are set to true don’t worry abt that lol.

Are you parenting the GuiObjects to the Frame, or the UIGridLayout inside the Frame? Because I believe it has to be the former in order to display GuiObjects.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.