How can i stop the camera of clipping

Im making a game for the inspire 2025, the bug is that when you scale the player (smaller) you can clip the camera trough the walls just like when using ShiftLock

local RunService = game:GetService("RunService")
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local head = char:WaitForChild("Head")
local Camera = workspace.CurrentCamera
if player.Name ~= "michuchito" then return end

local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {char,Camera}
raycastParams.FilterType = Enum.RaycastFilterType.Exclude

RunService.RenderStepped:Connect(function()
	local result = workspace:Raycast(head.Position,Camera.CFrame.Position - head.Position, raycastParams)
	if result then
		Camera.CFrame = CFrame.new(result.Position)
	end
end)

i tried this but its just… wrong

Try adding a result.Normal * 0.1 to your CFrame when setting the camera’s CFrame, something like this: Camera.CFrame = CFrame.new(result.Position + (result.Normal * 0.1))

If that doesn’t work, you can try subtracting instead of adding