Camera Script Help

Hello so i have this camera script

local cam = workspace.CurrentCamera
local char = workspace:WaitForChild("CameraRig")
local target = char.CamPart
local rotOffset = CFrame.Angles(math.rad(180),0,math.rad(180))
cam.CameraType = Enum.CameraType.Scriptable

local track = char.AnimationController.Animator:LoadAnimation(script:WaitForChild("Animation"))
track.Looped = false

cam.CFrame = target.TransformedWorldCFrame * rotOffset

wait(2)
track:Play()

game:GetService("RunService").RenderStepped:Connect(function()
	cam.CFrame = target.TransformedWorldCFrame * rotOffset
end)

For this cube
Screenshot 2022-08-10 163000
Screenshot 2022-08-10 170218
There are the properties as well and I don’t really know what im doing wrong if you know how to fix it let me know.

Best Regards,
Thothboy

1 Like

Hiya, are you able to send us a picture of your out put, and what are you trying to achieve exactly?

Yes ofc here is my output when i run the game

It’s a local script so you may have to wait for certain instances to replicate/load.

CameraRig:WaitForChild("CamPart")

1 Like

Alright thank you for the response but I think the problem with my script is I’m waiting for a humanoid child and my rig isn’t a humanoid so I’m going to remake the script for non-humaoid animations I’m not really sure how to do that though.

I found the solution if anyone is curious basically all you have to do is to remake the animation after adding a humanoid to the rig and then it will create an AnimSave and it will also give you a copy and paste number from when you upload the animation you made I then made a new custom animation script using some CFrame and other things like the usual camera animation stuff to finally get my result any question you need to be answered reply to me or smth.

Best Regards,
thothboy