First person animation help needed

Hi! I wanted to make a First person animation. I don’t know how i can do it. I went through the dev forum and the things i found didn’t help. I also tried making a seperate rig with the animation and attach the players camera to the head, but then the transition to the player was bad. I want to make the animation play in-game in First person, and keep the smoothnes when the player can move.

Can you try something like this?

game:GetService("RunService").RenderStepped:Connect(function()
	local cam = workspace.CurrentCamera
	local head = game.Players.LocalPlayer.Character.Head
	
	cam.CameraType = Enum.CameraType.Scriptable
	cam.CFrame = head.CFrame
end)

To switch it back, you’d set the camera’s CameraType property back to Custom, and make sure the CameraSubject is equal to the character’s humanoid

I believe OP is asking for animations and likely knows how to lock first person.

I think 1 solution is having a viewportframe and doing animations via that. A lot of FPS games do something similar, as it prevents clipping (at least in first person) and means you don’t need to code extra stuff like PUBG does where your character physically moves the weapon away from the wall.

Problem though: lighting will suck because… it’s non existant.

I heard that parenting to a specific place may make parts only visible to the player. Perhaps under the current camera?

If you still can’t find it, then I recommend creating it locally and making stuff visible only when you’re in first person. I think a lot of older Roblox games do this too.

Locking first person probably won’t do much because the camera won’t follow the character’s head

Edit: ViewportFrames are more than likely not a good option either, because they’re extremely low quality. I’ve tried using them for FPS games before

I did it, it is kind of messy but hey, it works! I did it using a Rig, that plays the animation, with players camera attached to the head. But before the animation i saved cameras last position, using a part, then i tween it to the last pos, and the player is already there so it will make a smooth transition. The script before used a boolean, which didn’t use the .Value and It didn’t error. Thank you for help, i apreciate it.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.