How can I edit this script?

I found this script and I want to change it, so it will warn in console when player is looking at an object, not when it is on script

local Part = workspace.uhh -- This is the part I want this script to check if is visible
local Camera = workspace.Camera
local Character = game:GetService('Players').LocalPlayer.Character

local RunService = game:GetService('RunService')

local Parameters = RaycastParams.new()
Parameters.FilterDescendantsInstances = {Character, Part}
Parameters.FilterType = Enum.RaycastFilterType.Blacklist

RunService.RenderStepped:Connect(function()
	local Vector, OnScreen = Camera:WorldToViewportPoint(Part.Position)

	if OnScreen then
		if workspace:Raycast(Camera.CFrame.Position, Part.Position - Camera.CFrame.Position, Parameters) == nil then
			warn('Part is Onscreen')
		end
	end

end)
2 Likes

im so i dont understand you. do you want it to warn in console when its looking at the object when its not on the script list?

Wdym? Script does what it should, I just wanna change it to what I wrote