Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make a text button for each hat in a player?

I don't know why, but this script only makes it for one hat, not all.

function hatsframe() local hats = char:GetChildren()

for i, v in pairs(hats) do
	if v:isA("Accessory") then
		local a = Instance.new("TextButton")
		a.Text = v.Name
		a.Parent = script.Parent
	end
	
end

end

can someone please help me??

2 answers

the script was inside lots of functions don't mind the ends

1 comment

0

is 'hats' an object or table?

You might want to change the position of the buttons

like Button.Position = UDim2.new(0,0,0,(Button.Size.X.Offset * i) + 5 )

Because as of now, you can only see one button, as the buttons are overlapping each other.

This discussion is preserved as it was. New answers, comments, and votes are closed.