i am trying to set players camera cframe to parts cframe for some reason don’t work
local script:
local camera = workspace.Camera
local part = workspace.CameraPart
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = part.CFrame
i am trying to set players camera cframe to parts cframe for some reason don’t work
local script:
local camera = workspace.Camera
local part = workspace.CameraPart
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = part.CFrame
Try replacing workspace.Camera with workspace.CurrentCamera
You ran the code before the character spawned.
The camera properties were set, but after the character spawned they were overwriten.
Simplest fix:
Put the script into game.StarterPlayer.StarterCharacterScripts
, this ensures the script was ran after the character has loaded.
Hope this helps!