Viewport Character Hell

Every free model viewport character thing I’ve used always has the same problems. It duplicates my GUI, and duplicates my Sound. I have 0 clue why this happens because nothing in the code I’ve read seems out of the ordinary. How do I fix this issue?

local vpf = script.Parent:WaitForChild("CharacterVPF")

local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
char.Archivable = true


local cam = Instance.new("Camera")
cam.Parent = vpf

vpf.CurrentCamera = cam


local clonedChar


game:GetService("RunService").RenderStepped:Connect(function()
	
	
	if clonedChar then clonedChar:Destroy() end
	
	
	clonedChar = char:Clone()
	
	local hrp = clonedChar:WaitForChild("HumanoidRootPart")
	
	cam.CFrame = CFrame.new(hrp.Position + (hrp.CFrame.LookVector * 5), hrp.Position)
	
	clonedChar.Parent = vpf
end)

Well it does its job by cloning the character. The issue is perhaps you use starter Character scripts to put scripts in your character which causes these gui effects to be doubled as well.

do

clonedChar = char:Clone()
for i,v in pairs(clonedChar:GetDescendents()) do
    if v:IsA("BaseScript") or v:IsA("Sound") then
        v:Destroy()
    end
end
	
local hrp = clonedChar:WaitForChild("HumanoidRootPart")
	
cam.CFrame = CFrame.new(hrp.Position + (hrp.CFrame.LookVector * 5), hrp.Position)
	
clonedChar.Parent = vpf

something like this?

local vpf = script.Parent:WaitForChild("CharacterVPF")

local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
char.Archivable = true


local cam = Instance.new("Camera")
cam.Parent = vpf

vpf.CurrentCamera = cam

vpf.CurrentCamera = cam


local clonedChar

clonedChar = char:Clone()
for i,v in pairs(clonedChar:GetDescendents()) do
	if v:IsA("BaseScript") or v:IsA("Sound") then
		v:Destroy()
	end
end

local hrp = clonedChar:WaitForChild("HumanoidRootPart")

cam.CFrame = CFrame.new(hrp.Position + (hrp.CFrame.LookVector * 5), hrp.Position)

clonedChar.Parent = vpf

Exactly, and make sure it updates