What I'm trying to do is display the current time position of a song/audio I have on a surfaceGUI, it plays it fine, but I can't find out how to display the current time inside the song. (e.g. say the song is halfway through and it is 60 seconds long, the text box would say 30)
local Song = game.Soundscape.Centuries -- Centuries is an already made sound in the Soundscape
local Myself = script.Parent
while Song:IsPlaying() do -- while the song Centuries is playing, do this.
Myself.Text = Song.TimePosition -- Displays the time on the text
wait(1) --To prevent lag
end
Currently the script is having a problem with Song:IsPlaying().
the Output states: Attempt to call method IsPlaying (a boolean value)
What am I doing wrong? Is there an easier way to do what I'm trying to do? (Sorry if this seems a tiny bit sloppy, this is my first question posted).
Edited:
wait(1) --To wait for client to load.
local Song = game.Soundscape.Centuries -- Centuries is an already made sound in the Soundscape
local Myself = script.Parent
while Song.IsPlaying do -- while the song Centuries is playing, do this.
print("I've gotten into the while script!")
Myself.Text = Song.TimePosition -- Displays the time on the text
wait(1) --To prevent lag
end
Says nothing and does nothing now that I've fixed it to this.

1 comment
I posted a new comment to help you. The problem is it's .IsPlaying not :IsPlaying