[HELP] Custom camera

Hello all.

I want to create a custom camera for login/character managment. The problem is, its not looking where I want it.

I have two cordinates of x, y, z:

  1. where I want to set the camera: CamCoord (In the sky)
  2. and where I want to look: CamRot (In town, Sandy Shores, at houses)

Here is my script:

local CAM = CreateCam("DEFAULT_SCRIPTED_CAMERA", true)
    
SetCamCoord(CAM, defaultCamPos.x, defaultCamPos.y, defaultCamPos.z)
SetCamRot(CAM, defaultCamPos.rX, defaultCamPos.rY, defaultCamPos.rZ)
SetCamFov(CAM, 60)
RenderScriptCams(true, false, 0, 1, 0)
SetCamActive(CAM, true)
local CAM = CreateCam("DEFAULT_SCRIPTED_CAMERA", true)

defaultCamPos = { the coords }
defaultCamRot = { the rotation }
    
SetCamCoord(CAM, vector3(defaultCamPos))
SetCamRot(CAM, vector3(defaultCamRot)
SetCamFov(CAM, 60)
RenderScriptCams(true, false, 0, 1, 0)
SetCamActive(CAM, true)

Try that instead
Put the pos in a different variable from the rot
And put them into vector3 tags like i did above