Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can I have a quick example of BindToRenderStep?

Asked by 8 years ago

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

Log in to vote
0
Answered by
Klamman 220 Moderation Voter
8 years ago
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)
0
How do I unbind it? laughablehaha 494 — 8y
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. Klamman 220 — 8y
Ad

Answer this question