Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can I have a quick example of BindToRenderStep?

I just want an example because this doesn't work


game:GetService("RunService"):BindToRenderStep(function()
Running = true
end)

while true do
If Running == false then
game:GetService("RunService"):UnBindToRenderStep(function()
Running = nil
end
end

1 answer

✓ Accepted answer
local function onRenderStep()
	local subjectPosition = cameraSubject.Torso.CFrame
	local cameraPosition = game.Workspace.Klamman.Torso.CFrame + offset
	camera:Interpolate(cameraPosition, subjectPosition, 1)
end

runService:BindToRenderStep("Camera", Enum.RenderPriority.Camera.Value, onRenderStep)

2 comments

0

How do I unbind it?

0

run:UnbindToRenderStep("Camera"). Just call the run service, use the unbind function, and use the name you gave in the first parameter of the BindToRenderStep function.

This discussion is preserved as it was. New answers, comments, and votes are closed.