Moon Animator 2 Camera Animation Scripting

Trying to get help related to Moon Animator 2 Cutscenes.

I saw this post and took its cinematic function and tried to port it to my cutscene.

local function Cinematic(CinematicsFolder)
	local CurrentCameraCFrame = workspace.CurrentCamera.CFrame
	local FrameTime = 0
	local Connection

	character.Humanoid.AutoRotate = false
	Camera.CameraType = Enum.CameraType.Scriptable
	
	Connection = RunService.RenderStepped:Connect(function(DT)
		FrameTime += (DT * 60) 

		local NeededFrame = CinematicsFolder.Frames:FindFirstChild(tonumber(math.ceil(FrameTime)))

		if NeededFrame then
			Camera.CFrame = NeededFrame.Value
		else
			Connection:Disconnect()
			character.Humanoid.AutoRotate = true
			Camera.CameraType = Enum.CameraType.Custom
			Camera.CFrame = CurrentCameraCFrame	
		end
	end)
	
end

local function onAwakenedInput(_,inputState)
	if inputState == Enum.UserInputState.Begin then
		Cinematic(script.GON.Cam)
	end
end

ContextActionService:BindAction("Awakening",onAwakenedInput,false,Enum.KeyCode.G)

This is my code, however the camera just pans out to some random place in the sky. I assume it’s because the Camera CFrame in Moon Animator 2 animations is hard-coded.

That leaves the question though, how do I work with it?

2 Likes

Bump.

Wsg gang. First off did you make sure you added the reference to the camera? If so, you need to separate the animation by deselecting the animation and exporting just the camera. Let me know if that doesn’t resolve anything. Hope this helps.