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

How would I have an script, based on values, make preset textbuttons for it?

As boldly asked in the title. I do not know and have tried my best to find on the internet about scripts that generate preset textbuttons on the amount of objects within a folder, that have value 1 and not 0. I had some ideas, like GetChildren, but with detecting values (probably using i,v in pairs). But after that I’m completely stuck on my mind. Please answer. Thanks in advance, even for trying.

2 comments

0

By generate do you mean create a text button?

0

Yes, from a preset one (distance between eachother etc.)

1 answer

To accomplish your goal I have a way you can do it.

--When you change the value I use this function to activate an event.

script.Parent.Value.Changed:Connect(function()
--if you want it to only happen on a certain value do
if script.Parent.Value.Value == 5 then
script.Parent.Visible = true
end
end)

1 comment

0

I actually want to have the script generate a textbutton and autosort it (having a preset distance between the buttons etc. and naming ot to the Value.Name if Value.Value == 1

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