Camera cframe isnt working

Hello, I’m Fayzulloh.
I was working on my camera until I noticed the camera CFrame wasn’t working
here’s the camera script:


local Player = game.Players.LocalPlayer
local Camera = workspace.CurrentCamera
local Character = Player.Character or Player.CharacterAdded:Wait()

repeat wait()
	Camera.CameraType = Enum.CameraType.Scriptable until
	Camera.CameraType == Enum.CameraType.Scriptable
	Camera.CFrame = workspace.Camera1.CFrame

here’s my CFrame script:

while wait() do
-- orientation and cframe here
end

Anyone know how to fix it?

Your issue is that you have no code in your “CFrame script”.

1 Like

no I put the code in my cframe script like

while wait() do
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0, 0.1, 0)
end

something like that
it still doesn’t work i dont know why

Any generic loops are simply too slow to handle the cameras. Try using RunService’s Stepped or any similar functionalities that exist within such as BindToRenderStepped.

More information about the RunService: RunService | Documentation - Roblox Creator Hub


Additionally, the LocalScript is unable to run in workspace. Find a different approach on this.

You can find more information on that here: LocalScript | Documentation - Roblox Creator Hub

1 Like