The code below is for positioning the camera so that the player can make a custom character. After the BoolValue CC is false it reverts the current camera to the head of the player. For some reason, the camera is all crapped up and doesnt look right in first person. What can I do to fix this?
local target = workspace:WaitForChild("Viewpart")
local camera = workspace.CurrentCamera
camera.CameraType = "Scriptable"
camera.CameraSubject = target
--camera.Focus = CFrame.new(target.Position)
local angle = 90
local i = 0
wait(0.5)
while script.Parent.CC.Value == true do
wait(0.09)
camera.CoordinateFrame = CFrame.new(workspace.OtherThing.Position) --Start at the position of the part
camera.CameraType = "Track"
end
if script.Parent.CC.Value == false then --CC stands for CharacterCustomizer and its a BoolValue
camera.CameraSubject = script.Parent.Parent.Character:WaitForChild("Head")
wait(0.1)
camera.CameraType = "Scriptable"
wait(0.01)
camera.CameraType = "Custom"
end |