Question with RunService:BindWithRenderStep

So recently I’m writing an script that decides if a player will play body tilt animations etc.
Since there are quite some parts of it including PlayerHeadTilt etc that I want to make them toggleable in settings.

I want to do something like

FuncA = true
FuncB = false
FuncC = true
local function bindfunctions()
    RunService:Unbind(FuncA)
    RunService:Unbind(FuncB)
    RunService:Unbind(FuncC)
    if FuncA then
        RunService:BindToRenderStep("FuncA",201,FuncA)
    end
    if FuncB then
        RunService:BindToRenderStep("FuncB",201,FuncB)
    end
    if FuncC then
        RunService:BindToRenderStep("FuncC",201,FuncC)
    end

If there’s any flaws in the script dont mind cus this one is just a brief demonstartion of what I want to do.
My two questions are, first do I have to set different priorities for the three functions? Such as 201,202 and 203? (I want it to run before camera so 200+)
Second, do I have to use task.spawn or task.defer to run the functions if I bind them seperately?
Any help will be appreciated!

I solved the first question! I searched up in the runservice documentation, I do have to set them to different priorities, or else roblox will pick whichever one to runfirst. And the second question, I think it’s still good to use task.defer anyways! Thanks everyone even you didn’t reply!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.