Can you make a :RenderStepped function fire for a certain amount of time?

Just a general question, just wondering if you put a loop over a renderstep function and event firing

The best way you can do this is using the BindToRenderStep, add a wait after making the function, then use UnbindFromRenderStepped. RenderStepped function alone will always fire regardles if the loop has ended

Here is an example you could use

local runServ = game:GetService("RunService")

local PrintRenderName = "Print"

runServ:BindToRenderStep(PrintRenderName, Enum.RenderPriority.Character.Value, function()
	print("Printing from render step!")
end)

wait(5)
local success, err = pcall(function()
	runServ:UnbindFromRenderStep(PrintRenderName)
end)
3 Likes