Hello! I am making this for my friend because they do not have access to post on the DevForum.
Here is their question: How do i make a UI that shows a list of audios from a array?
Simple enough, they do not want to give me the code.
3 Likes
Are we under the assumption here that you’d want to store just the ID’s of the audio in possibly a table or is your friend intending to store the audios directly (to where the sounds/audios are stored in a folder somewhere in the game). Both can work but its best to know what your friend is hoping to achieve or how your friend wants to approach the matter.
1 Like
local UI = ...
local TemplateUI = ...
local audioIDs = {"rbxassetid://0"}
for _, audioID: string in audioIDs do
local template = TemplateUI:Clone()
template.Text = audioID
template.Parent = UI
end
where
-
UI
is the parent UI, typically aFrame
which acts as a container. -
TemplateUI
is the UI which will act as a component that shows the audio ID, typically (and in this case) aTextLabel
.
FYI, you can manually set the position of the template
but I recommend parenting a UIListLayout
under UI
to make the process easier and flexible.
3 Likes
Perhaps in a folder, i’m not sure.
Thank you so much - from Gord
I think that solved it for them
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.