How do I make a wall that obstructs the view of something, but still appears invisible

basically like an invisibility cloak. I still want to be able to see the object just only when behind the wall

This might be useful for your case:
Vector3 Dot Product: Calculating NPC Field of View (Roblox Studio) - YouTube

You can use this video to calculate if the part is behind the wall.

you could try getting tricky with client rendering, rendering whatever is on one side of the invisible wall thing on the client if they’re on the other side.

You could use raycasts.

Shoot a ray from the player’s camera position (game.Workspace.CurrentCamera.CFrame.Position) to the object’s position.

I recommend setting the FilterType of the ray to Whitelist and FilterDescendantsInstance to a list containing just the wall and object, {wall, object}. This will make it so the only thing the ray cares about are the wall and the object, which should be enough. You can skip this step to include everything in Workspace, but that can get messy, and probably isn’t what you want.

You will either get back a RaycastResult or nil. Use the result to determine if the object should be invisible or not.

local object -- set this!
local wall -- set this!
local camPos = game.Workspace.CurrentCamera.CFrame.Position
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {wall, object}
raycastParams.FilterType = Enum.RaycastFilterType.Whitelist
local raycastResult = game.Workspace:Raycast(camPos, (object.Position - camPos) * 2, raycastParams)

if raycastResult then
    if raycastResult.Instance == wall then
        -- do something (hide the object?)
    end
end

You have a few options where to put this code. But the best place to put it is probably in an event listener for when the camera moves, which you can get by doing

game.Workspace.CurrentCamera:GetPropertyChangedSignal('CFrame'):Connect(function()
    -- Your code here
end)

This code would need to be in a LocalScript in order to run on the client.

This is somewhat similar.