The code that I rewritten many times was pretty shit so I was wondering if I could get some help? The script is supposed to pan to the Player if he enters your house.
if (game.Workspace.House.Position - game.Players:GetPlayers().Position).magnitude < 15 then
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
game.Workspace.CurrentCamera.CFrame = game.Workspace.CurrentCamera.CFrame:Lerp(game.Players:GetPlayers().CFrame)
else
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
end

2 comments
I'm assuming this is in a server script. You can only change the camera in a local script
You can use that same script, but instead of checking using game.Players:GetPlayers() just check for the LocalPlayer, and if their HumanoidRootPart is within distance of the house