Problem with CalcView function

Hello everybody!
I tried to use this example

But it doesnt work fully.
Local player see itself but origins and angle doesn’t change at all

So if even i delete
[lua]view.origin = pos-(angles:Forward()*100)
view.angles = angles
view.fov = fov[/lua]
this, it works without any changes.

Can anyone help me please?

You have to return the view table. that has an example of how you need to do it.

Bleh i returned it

This function doesn’t work in any gamemodes (GarryTV, Mario Boxes)…
I dont know what to do

This is how I use CalcView

function GM:CalcView( player, pos, angles, fov )

	local STOOD = {}
 	STOOD.origin = pos-(angles:Forward()*25 + angles:Right()*-15 + angles:Up()*-2)
 	STOOD.angles = angles
	STOOD.fov = fov
	local CROUCH = {}
 	CROUCH.origin = pos-(angles:Forward()*25 + angles:Right()*-15 + angles:Up()*-25)
 	CROUCH.angles = angles
	CROUCH.fov = fov

if ( LocalPlayer():OnGround() && LocalPlayer():KeyDown(IN_DUCK)) then
        return CROUCH
        return STOOD 



hook.Add(“ShouldDrawLocalPlayer”, “DrawLocalPlayer”, function( player )
return true

If you’re trying to create a sway on the camera as you turn then I can’t help you there.