What do you want to achieve?
I want to make some sort of rhythm game that mainly uses call and response. I decided to follow a tutorial and changed some things to what I prefered.
What is the issue?
The test on straight 8th notes are inconsistent.
The beeping starts at 9 seconds
What solutions have you tried so far?
I tried many rhythm game related devforums and tutorials but those didn’t really help.
function Reader(MapName)-- Not using MapName right now
local last = tick()
local time = 0
for i = 1, #requiredModule.notes do
time = last + (requiredModule.notes[i][1]/1000)
repeat
RunS.RenderStepped:Wait()
until tick() >= time
coroutine.wrap(function()
-- Makes sound
if requiredModule.notes[i][2] == 1 then
local Root_S = Instance.new("Sound")
Root_S.Parent = LocalSounds
Root_S.SoundId = "rbxassetid://9113880610"
Root_S.PlayOnRemove = true
Root_S:Destroy()
end
-- Then, Makes a ui note
end)()
end
end
Seems like the sfx has to load each time a note is meant to play? That could cause a delay. It can help to reuse a pre-loaded sfx instead of creating and destroying one every time it’s meant to play.