The Player instance has a Player.Character property. On the client, you could check for a keypress and temporarily detach the character from the player instance, returning it when you wish to return back.
You could also try modifying the workspace.CurrentCamera properties, changing the camera type or making it not spectate to the player if that would work better for you.
just to reiterate, you anchor the arms of the viewmodel, I’m assuming you have an understanding of gun systems and know what a viewmodel is
a true complexity will come when you want to move (your character around) while freelooking, I think that would be really cool, I don’t know how to code that though, something to do with setting the position of viewmodel arms while in freelook mode.
nvm i dont think this would work considering my viewmodel is being in a SetPrimaryPartCFrame Meaning my humanoidrootpart of my viewmodel would always be in my camera’s CFrame no matter where you look, but i think i can change that but idk
you need to set the humanoid’s auto rotate property to false while in freelook mode (opposite in vice versa), this will negate the issue I think, unless the hrp of the viewmodel is constantly changing with the camera cframe
ill try rigging the viewmodel arms to the HumanoidRootPart (From Player Character) when freeLooking, but when stopped the viewmodel would be rigged to the HumanoidRootPart (Viewmodel), Ill test it out but i need to figure out how to stop that SetPrimaryPartCFrame
i assume you have a loop setting the viewmodel arms cframe to where they should be
you could just add a check off a bool or something thats true whenever freelook button is held and just not set arm cframe
The way I would go about this is having a custom camera. First Step, I would create a “calculatedAngle” variable. The way I would calculate said angle is by having the Mouse Behavior be on LockCenter. Then taking the delta mouse to calculate an angle relative to the head using the CFrame.Angles constructor and setting it to the “calculatedAngle” variable. Then I would change the camera CFrame to the head CFrame multiplied by the calculated angle
alr i finally figured it out on how to make the arms face the players character direction. theres an issue. when you look back the arms will face the camera direction instead of the character direction. is there any way to limit the rotation of the camera?