Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do I get the camera on the player again?

Asked by 2 years ago

I made a part that is acting as a camera this is the code

local Player = game.Players.LocalPlayer

local Character = Player.Character or Player.CharacterAdded:Wait()

local CurrentCamera = game.Workspace.CurrentCamera
local NewCam = game.Workspace.MenuCam

function changeMode()
    repeat wait()
        CurrentCamera.CameraType = Enum.CameraType.Scriptable


    until CurrentCamera.CameraType == Enum.CameraType.Scriptable


end


function changeCamera()
    CurrentCamera.CFrame = NewCam.CFrame


    wait()
end

changeMode()
changeCamera()

but I cant get the player camera back! any ideas how to do this?

Answer this question