Tweening camera to look at a part makes screen black

it does it before the entire script is done, loading all variables. Its put all the way at the top

Let me check the script again to see if there isn’t any other possible ways this error could be happening.

heres the entire script:

-- Freind finder Start menu By Bungar :3
-- Version 4


-- Services
local Plr = game:GetService("Players")
local StarterGui = game:GetService("StarterGui")
local tweenservice = game:GetService("TweenService")


-- Other Things
local tool = script.Parent.Parent.Activated
local User = Plr.LocalPlayer.Name
local Display = Plr.LocalPlayer.DisplayName
local E = script.Parent.Parent:WaitForChild("Start")
local E2 = script.Parent.Parent:WaitForChild("StartPub")
local screen = script.Parent.Parent.Screen
local cam = game.Workspace.CurrentCamera



-- Vents'
local CWIN = game.ReplicatedStorage:WaitForChild("BindableEvents"):WaitForChild("CwindowChanger")
local Event = game.ReplicatedStorage:WaitForChild("RemoteEvents"):WaitForChild("NosePass")


-- Strings n' tables
local WM = ""
local Tips = {
	"Hi";
	"ok";
}
local WMs = {
	"Welcome, ";
	"Hello, ";
	"Good Day, ";
	"How are you, "
}


-- Tweens 
local FocusInfo = TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out)

E2.Volume = 0

-- Script
tool:Connect(function()
	local Focus = tweenservice:Create(cam, FocusInfo, {CFrame = (CFrame.LookAt(cam.CFrame.Position, screen.Position))})
	local M = Plr.LocalPlayer.PlayerGui:WaitForChild("FriendFinder"):WaitForChild("Main")
	CWIN:Fire("Main")
	
	Plr.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
	task.wait(.1)
	Focus:Play()
	task.wait(.2)
	local function ChangeFov(Fov, Time)
		tweenservice:Create(cam, TweenInfo.new(Time), {FieldOfView = Fov}):Play()
	end
	ChangeFov(20, 0.2)
	task.wait(.2)

	script.Parent.Parent.Enabled = false
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
	M.Visible = true
	E:Play()

	task.wait(1)
	cam.FieldOfView = 70
end)

I found the problem. Try using this now: local Focus = tweenservice:Create(cam, FocusInfo, {CFrame = (CFrame.lookAt(cam.CFrame.Position, screen.Position))})

Use this line instead.

I accidentally capitalized the “L” in lookAt which caused to become nil.

now it does whatever this is

The camera shouldn’t be moving, it should be rotating to the screen, that’s weird.

well idk the issue and idk how to fix it, can you? idk whats wrong

I’m checking your full script to see when this tween is playing right now.

Add this line before you play the tween:
cam.CameraType = Enum.CameraType.Scriptable
You can switch to this after when you don’t need the camera to look at the screen:
cam.CameraType = Enum.CameraType.Custom
This causes the camera to go back to the player.

its still doing the same thing

You can add the custom cameratype by using an event called “unequipped” which runs a function when the player unequips the tool. IF the player’s starterGUI is disabled you can also use player.Character.Humanoid:UnequipTools() in probably a server script, and since I see you have a GUI you can make the exit button to fire a remote event to the server to run this.

already doing that though
char limit

Oh. Well then, I have no idea what may have caused it to act like that, if I can come up with an answer I will surely inform you. I will check again the script to see potential reason, but other than that I’m clueless at this point.