So, for fun I’m recreating a 2019 - Early 2020 version of the game Sound Space, and I’m struggling to get note spawning to work correctly.
As most of the notes do spawn correctly, the notes at the start of a map are always bugged if they appear before SongPosition minus ApproachTime.
Video of issue:
And my current note spawning code, I know it’s bad but idk how else to do it.
task.spawn(function()
task.wait(ApproachTime)
script.MapMusic.Volume = 1
script.MapMusic:Play()
end)
for Index, Value in pairs(MapData) do
local NoteData = string.split(Value, '|')
task.spawn(function()
repeat
task.wait()
until script.MapMusic.TimePosition >= tonumber(NoteData[3]/1000) - ApproachTime or not PlayingMap
if PlayingMap then SpawnNote(NoteData) end
end)
end
Thanks for reading and or helping!