I keep getting this error:
However the music still plays and loads its just it breaks my music board and it is weird cuz i put if statements in to stop this breaking but it still does… Please help!
Script
task.wait(4)
local songObject = workspace:WaitForChild("Song")
local MusicBoards = workspace.MusicBoard
function Format(Int)
return string.format("%02i", Int)
end
function convertToHMS(Seconds)
local Minutes = (Seconds - Seconds%60)/60
Seconds = Seconds - Minutes*60
local Hours = (Minutes - Minutes%60)/60
Minutes = Minutes - Hours*60
return Format(Minutes)..":"..Format(Seconds)
end
while true do
if songObject.SoundId == 8577856560 then
warn("Adertisement")
for _, Board in pairs(MusicBoards:GetChildren()) do
Board.Actual.Model.Model.SetUpScreen.Screen.SurfaceGui.Frame.timestamp.Text = "Time: " .. "Advertisement" .. " / " .. "Advertisement"
end
else
local timelen = math.floor(songObject.TimeLength)
local timeleft = math.floor(songObject.TimePosition)
local timelen = convertToHMS(timelen)
local timeleft = convertToHMS(timeleft)
task.wait(0.1)
for _, Board in pairs(MusicBoards:GetChildren()) do
Board.Actual.Model.Model.SetUpScreen.Screen.SurfaceGui.Frame.timestamp.Text = "Time: " .. timeleft .. " / " .. timelen
end
end
end
Board:
Let me know below!
Signed:
Intorsetorpolice1 / kieranl29
Senior Developer, Popsiz Parlor