What do you want to achieve?
Making Camera Turn Without Making It Scriptable
What is the issue?!
the camera won’t turn unless its set to scriptable
What solutions have you tried so far?
I’ve looked throught devforum,youtube and even roblox’s documentation on it
while wait() do
--game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
game.Workspace.CurrentCamera.CFrame = game.Workspace.CurrentCamera.CFrame*CFrame.fromOrientation(math.rad(0),math.rad(0),math.rad(5))
end
TS = game:GetService("TweenService")
game:GetService("RunService").RenderStepped:Connect(function()
local camera = workspace.CurrentCamera
TS:Create(camera, TweenInfo.new(3, Enum.EasingStyle.Linear), {CoordinateFrame = script.Parent.PrimaryPart.CFrame}):Play()
end)
Another one i have is:
A = 0.05
game:GetService("RunService").RenderStepped:Connect(function()
local camera = workspace.CurrentCamera
camera.CFrame = camera.CoordinateFrame:Lerp(script.Parent.PrimaryPart.CFrame, A)
end)
Hey, actually I got the code that won’t keep on rotating
local camera = game.Workspace.CurrentCamera
local UIS = game:GetService("UserInputService")
game:GetService("RunService").RenderStepped:connect(function()
local x,y,z = cam.CFrame:ToEulerAnglesXYZ()
if UIS:IsKeyDown(Enum.KeyCode.E) then
camera.CFrame = CFrame.new(camera.CFrame.Position) * CFrame.Angles(x,y,z) * CFrame.Angles(0,0,math.rad(2))
else
camera.CFrame = CFrame.new(camera.CFrame.Position) * CFrame.Angles(x,y,z)
end
end)
I’d suggest lerping the camera’s CFrame for smooth results though (lmk if you need help doing that)