I have a script where I don’t need coroutine anymore (look at the last line):
local damaging, true
local function doDamage()
print("dmg")
end
local damage = coroutine.wrap(function()
repeat
doDamage()
wait(0.09)
until not damaging
end)
damage()
wait(0.8)
damaging = false
How can I stop the coroutine / end thread? Does Roblox do it for me?