Help with ViewPortFrames

I’m trying to make a clone of the player a paste it over the player character to make the character unaffected by lighting and mostly importantly by ColorCorrectionEffect as I don’t want them to be affected by the colour change.

However the issue is that everytime i zoom out the “Fake” Character model goes down.

Any way to fix this? Any help with be much appreciated.

(here is the code if that helps)

local Player = game.Players.LocalPlayer
local Char = Player.Character or Player.CharacterAdded:Wait()

local VPF = script.Parent.ViewportFrame
local Camera = game.Workspace:WaitForChild("Camera")
local NewCamera = Instance.new("Camera")
NewCamera.FieldOfView = Camera.FieldOfView
NewCamera.Parent = VPF
NewCamera.CFrame = Camera.CFrame

repeat wait(.1) until game:isLoaded()
VPF.CurrentCamera = Camera
Char.Archivable = true
local CloneChar = Char:Clone()
CloneChar.Parent = VPF.WorldModel
CloneChar.HumanoidRootPart.Anchored = false
Char.Archivable = false

local Rs = game:GetService("RunService")
Rs.heartbeat:Connect(function()
	NewCamera.CFrame = Camera.CFrame
	CloneChar.HumanoidRootPart.CFrame = Char.HumanoidRootPart.CFrame
end)

enable IgnoreGuiInset on the ScreenGui that has the ViewportFrame

Hi, i dont know exactly what you are trying to achieve, but if i understand it correctly, you just want a specific players (in this case the local players) character to be inside of a viewport frame without falling. Im assuming you dont need it to move in any way, but i will give you a solution for both cases.

The best solution for this is just simply anchoring the characters HumanoidRootPart:

CloneChar:FindFirstChild("HumanoidRootPart").Anchored = true

BUT, just in case you really want it unanchored, you could just place a part below the character thats Transparency property is set to 1, is anchored, and its size is wide, but short. (UDim2.new(50, 1, 50))

Also, getting the camera is as simple as workspace.CurrentCamera, and instead of just using wait for yielding until the game is loaded i would use task.wait(), with no value given, (it defaults to 0) as it is more efficent.

Thank you everyone all of your input fix the issue