Camera manipulation not working

so i made a simple camera manipulation script it does work on the baseplate but not on the disired object ive tried allot of changes but it doesnt work well

im also not the best with camera manipulation, anyways my qeustion is why isnt this code working or what did i do wrong?

local cam = game.Workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = workspace.TV:WaitForChild("Screen").CFrame +,0,20)

What are you trying to do with the camera? Is it straight up not setting your camera’s cframe or what?

Use RunService. This should do the trick.

local RunService = game:GetService("RunService")

local cam = game.Workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable


    cam.CFrame = workspace.TV:WaitForChild("Screen").CFrame +,0,20)

ill test that idk if it will work

This shouldnt be necessary. Since its being set to the same location.

and also im just trying to set the cframe

Well if I don’t use RunService, the camera CFrame will just set once and will return to the player’s character immediately after.

I mean again, you don’t need a renderstepped loop, you can just set it directly.

it dindt work like it keeps saying that it yielded for the tv indecating that the code has run no errors just the yield msg

oh use workspace:WaitForChild(“TV”)

both options dont work it just does nothing

If it’s infinite yielding that means Screen doesn’t exist in workspace.TV

well it clearly does

Does your game have streaming enabled? Streaming enabled removes instances from the workspace if they are too far from the player when you are play testing.

do you mean filtering enabled as i dont know what streaming enabled is

No, I mean streaming enabled Content Streaming | Documentation - Roblox Creator Hub

well do i disable or check if its on??

Try disabling it and see if the problem persists.

done i disabled it ima see if it works now

this resolved the problem however my camera is facing wrong direction