My realistic first person system doesnt work also doesnt give breaking point

This script is under the StarterCharactersScripts

local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character.Humanoid
local CanViewBody = true
local runservice = game:GetService("RunService")
local running = true
-- camera settings
player.CameraMaxZoomDistance = 0.5 
camera.FieldOfView = 100
humanoid.CameraOffset = Vector3.new(0, 0, -1)



function updatechar()
	
for _, v in pairs(character:GetChildren())do
	if CanViewBody then
		if v.Name == 'Head' then
			v.LocalTransparencyModifier = 1
			v.CanCollide = false
		end
	else
		if v:IsA'Part' or v:IsA'UnionOperation' or v:IsA'MeshPart' then
			v.LocalTransparencyModifier = 1
			v.CanCollide = false
		end
	end
	if v:IsA'Accessory' then
		v:FindFirstChild('Handle').LocalTransparencyModifier = 1
		v:FindFirstChild('Handle').CanCollide = false
	end
	if v:IsA'Hat' then
		v:FindFirstChild('Handle').LocalTransparencyModifier = 1
		v:FindFirstChild('Handle').CanCollide = false
	end

	end
	end

What is wrong with it?

Also the Character is R6 not R15

You never actually called it anywhere…
I’m assuming this is supposed to run every frame so just add this after the function:

runservice.RenderStepped:Connect(updatechar)