I am trying to play moon animator camera animations in game, but it doesnt work as intended and just snaps my camera. Here’s the code I’m using.
local fps = 1/60
local fold = game:GetService("ReplicatedStorage"):WaitForChild("Rush_Camera"):WaitForChild("Frames"):GetChildren()
local frames = #fold
local cam = workspace.CurrentCamera
for i=1,frames do
local cf = fold[i]
if cf then
cam.CFrame = cf.Value
wait(fps)
end
end
just replacing the wait should work, however its better if you wrap the whole code in the renderstepped function
local runservice = game:GetService("RunService")
for i=1,frames do
local cf = fold[i]
if cf then
cam.CFrame = cf.Value
runservice.RenderStepped:Wait()
end
end
or alternatively, you can animate the camera with my rig which makes the implementation of imported camera animations much easier
you would need to remake the camera animation on the rig, to make the rig move relative to the player just clone a new rig whenever a players character is loaded and weld the root parts together
oh yeah make sure the rigs cframe is the same as the humanoidrootpart while animating so you know its 100% going to work
Would I weld the cam part to the player, then put a motor6d and then just put it in the rig and then animate it for camera effects relative to the player.?