I am wondering how to use coroutine.yield() because i can't figure out how it works. I have tried to understand the article on the Roblox's own devhub, but I just can't understand it. Can anyone help?
Code:
function Alarms.On(Color)
for i, v in pairs(Alarms.AlarmTable) do
v.Activate(Color) -- Activates a bunch of smaller scripts
coroutine.yield() -- Tries to yield but fails
end
end

1 comment
Sorry, but this didn't work, and I know why it won't.. It's activating a bunch of outside scripts and it simply waits for them to finish, which is unfortunaley not gonna work.