Return an object-oriented binding on RunService:BindToRenderStep

Edit: Never mind, forgot I should’ve been using Heartbeat for animations.

As a Roblox developer, it is currently too inconvenient to treat RenderStep bindings separately from RBXScriptConnections (especially in the case of Maid-like event cleaners!). Currently, you have to store and generate unique names for each binding if you want to unbind them in the future. Having this feature would definitely make OO a lot easier.

Current solution:

self.BindingName = HttpService:GenerateGUID()

RunService:BindToRenderStep(self.BindingName, 500, function()
	-- stuff
end)
RunService:UnbindFromRenderStep(self.BindingName)

Ideal solution:

self.Binding = RunService:BindToRenderStep("Example", 500, function()
	-- stuff
end)
self.Binding:Disconnect()
3 Likes

This topic was automatically closed after 1 minute. New replies are no longer allowed.