So like I want a frame with a frame inside it that fill up the outer frame and should be right at the end once the sound has ended, how would I do that. For any song.
When you create the sound, you use Instance.new("Sound")
The object you get from that is the Sound object, you can use sound.TimeLength
(for the full length of the music) and then sound.TimePosition
for the amount of time elapsed of that music
Using that you can change the width of a frame inside the other frame by simply dividing the current position by the full size
local sound = mysoundvariable local parent_frame = script.Parent:FindFirstChild("Frame") local progress_frame = parent_frame:FindFirstChild("Frame") -- Every half second while wait(.5) do parent_frame.Size = UDim2.new(sound.TimePosition/sound.TimeLength, 0, 1, 0) end
This is untested, but this is just the general idea.
Closed as Not Constructive by hiimgoodpack, abnotaddable, and PyccknnXakep
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?