How can I put perspective of part on a viewport frame?

This is my first time using viewport frames,
the viewports camera is a camera placed on front of the drone
image
Im trying to get the all parts from the camera view to put it into the viewportframe
How can I do this?

1 Like

i think of way rather adding everything that is in workspace (with updating when something is added or deleted)

1 Like
local frameTime = 1
local LastTick = tick()
local inScene = {}

RunService.RenderStepped:Connect(function(dt)

	if tick() - LastTick > frameTime   then
		
		for _, Object in workspace:GetDescendants() do
			
			if Object.ClassName ~= "Part" then
				continue
			end
			
			local vectorObject, onScreen = ViewportCamera:WorldToViewportPoint(Object.Position)
			
			
			if onScreen and not table.find(worldmodel:GetChildren(), Object) then
				
				local Import = Object:Clone()
				Import.Parent = worldmodel
			
				
			end
			
			
		end



		LastTick = tick()
	end

end)

This is what I have right now, I cant get it to stop cloning parts that already exist