Run a Function When a Single Frame Has Passed

I know this is a really weird question, but I promise there’s a reason for it lol. Like the title says, I was wondering it there’s any way to run a Heartbeat or RenderStepped function only once, or if there are any alternatives to achieve this. In other words, I want a function to run when a single frame has passed, and it can only fire once at a time, until a cooldown finishes. (Not posting the code that I’ll be using this in, since it doesn’t help in any way.)

RunService.RenderStepped:Once() ?
Every RBXScriptSignal has multiple ways to connect. Once just calls the passed function a singular time before disconnecting.

Try controlling it with a Boolean, it’ll save you disconnecting and creating new functions each time. Or, just unbind it from RunService.RenderStep.

local runService: RunService = game:GetService("RunService")

local shouldIgnore: boolean = false

local function onStep(): nil
    if shouldIgnore then return nil end
    shouldIgnore = true

    --code goes here

runService:BindToRenderStep("OnStep", 2000, onStep)

--or, whenever you change the Boolean to control it, call: