Ad
Log in to vote
0

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

Asked by 4 days ago

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??

Hi.

Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.

.

..

...

Now back to your regularly scheduled Scripting Helpers....

...

..

.

2 answers

Log in to vote
0
Answered by 4 days ago

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

0
is 'hats' an object or table? Troxure 3 — 4d
Ad
Log in to vote
0
Answered by 4 days ago
Edited 4 days ago

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.

Answer this question



Ad