Would this work?

Hello devs,
I made this code, I don’t know if this would work.
I wanna make a Damage Overtime system.
I rarely use repeat until , That’s why i’m asking.

For those who are wondering, the Duration is just a number (1, 2, 3, 4, 5, etc…)

No, you would need to something besides duration for the condition.

local t = 0
repeat
    task.wait(1)
    t += 1
    Take damage(total/duration)
until t == duration