i am changing the players cameras CFrame but when i want to change back to the players normal camera it doesn’t change to the normal camera
heres a snippet on me trying to change the camera to be like before i changed it
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local UIS = game:GetService("UserInputService")
local thing = true
UIS.InputBegan:connect(function(input)
if Enum.KeyCode.Q == input.KeyCode then
if thing == true then
print(thing)
camera.CameraType = Enum.CameraType.Fixed
local pos = workspace.camera.CFrame.Position
camera.CFrame = CFrame.new(pos,pos + workspace.camera.CFrame.lookVector)
thing = false
else
print(thing)
camera.CameraType = Enum.CameraType.Custom
thing = true
end
end
end)
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local UIS = game:GetService("UserInputService")
local thing = true
UIS.InputBegan:connect(function(input)
if Enum.KeyCode.Q == input.KeyCode and thing == true then
print(thing)
camera.CameraType = Enum.CameraType.Fixed
camera.CFrame = CFrame.new(workspace.camera.CFrame.Position,workspace.camera.CFrame.lookVector)
thing = false
elseif thing == false then
print(thing)
thing = true
camera.CameraType = Enum.CameraType.Custom
end
end)
i don’t get what you’re saying sorry but all i’m saying is if you want to get the vector3 position of the camera then you have to do workspace.CurrentCamera.CFrame.Position