UnbindFromRenderStep Does Not Throw Error

According to the documentation, it says “If there is no bound function by the given name, this method raises an error.”

For some reason, it does not throw an error when you try to unbind an non existing function. Just try this code in an empty script or output bar:

local RunService = game:GetService("RunService")
RunService:UnbindFromRenderStep("drawImage")
1 Like

Yeah, from as far as I can tell, it’s a bug. I tried using Roblox’s given code, with some modifications. I binded a new function to :BindToRenderStep, and it gives the output if it being a success.

local RunService = game:GetService("RunService")

function Testing() end

RunService:BindToRenderStep("test",1,Testing)

local success, message = pcall(function() RunService:UnbindFromRenderStep("drawImage") end)
if success then
	print("Success: Function unbound!")
else
	print("An error occurred: "..message)
end

Output:
image

Yeah it doesn’t seem to care what argument you pass it (besides Argument 1 missing or nil) and it also gives no feedback (success/fail).

game:GetService("RunService"):UnbindFromRenderStep({1,1,1,1,1}) “works”.

Good thing you need posting permissions to report bugs/give platform feedback.

1 Like