How do i get a plr's camera and how do i play an animation on it?

i’m having trouble locating the local player’s camera object. i want to play an animation on it because i’ve animated camera angles with a plug in but i don’t know how to play it on the player’s camera…

also Do i just add an Animation Controller to the camera?

you have to use a local script. You can get the players camera by firing this code in a local script

local playerCamera = workspace.CurrentCamera

Thank you, would i have to apply an animationcontroller to animate the camera?

no you would use tween services and do what is called “Camera Manipulation”. This is a good video on it

1 Like

thank you, i have found a script that matches my issue but when editing it, it works but the camera just starts to appear everywhere randomly

-- Something to note is that wait() minimum waiting time is 0.0333 meaning if you recorded the camera originally in 60 frames per second and try to wait for 1 out of 60 frames per second(0.016) it will automatically go to 0.03

	-- Basically the highest rate you can go is 30 frames per second unless you use something like RunService.Heartbeat:Wait() that waits based on the current system's framerate but I wouldn't recommend it if you have animations you want sync to the camera movement

	--The speed of each camera frame moves
	-- Its set to 60 frames per second
	local fps = 1/60
	-- This grabs the camera folder that contain the frames and get all children
	local fold = workspace:WaitForChild("MoonAnimatorExport"):WaitForChild("intro_Camera"):WaitForChild("Frames"):GetChildren()
	-- This is how many frames are in this camera movement
	local frames = #fold
	--Replace this with the camera you want to move

	-- This will run for each frame
	for i=1,frames do
		--This grabs the CFrame value from the folder base on what frame we're on
		local cf = fold[i]
		-- Check if the object exists
		if cf then
			--Set the CFrame to the current frame CFrame
			cam.CFrame = cf.Value
			--Wait the fraction of the frames per second(this is the seconds you wait for one 1 out of 60 which is 0.016)
			wait(fps)
		end
	end

https://gyazo.com/16202858b8e75236970ccc18bd9c7b00 – result (just a warning it’s moving REALLY fast so it might not be comfortable with those who can’t look at images move extremley quickly)

do you have any idea of why this could be happening?

note: the camera is set to “Custom” Mode.

i found the script here; How would I use camera animations from moon editor in game? - #2 by dornuthedude

(better depiction, i switched the camera CFrame to a part’s CFrame https://gyazo.com/d043cb390544e76b0a91595f6b08403d)