I’m trying to overlay a sort of “camera shake” animation (that I created in blender) to create the feeling of viewing a video through a hand-held camera. To do this, I created this script below:
local rs = game:GetService("RunService")
local char = script.Parent
local repStor = game:GetService("ReplicatedStorage")
local vm = repStor:WaitForChild("FakeCam"):Clone()
vm.Parent = workspace.CurrentCamera
local camAnim_Walk = vm.WalkShake
vm.Animation:LoadAnimation(camAnim_Walk):Play()
workspace.CurrentCamera.CameraType = Enum.CameraType.Follow
rs.RenderStepped:Connect(function()
vm.HumanoidRootPart.CFrame = char.HumanoidRootPart.CFrame
workspace.CurrentCamera.CFrame = vm.FakeCamera.CFrame
end)
When I use this method, though, I can’t move the camera in any direction (I have it set to LockFirstPerson). Does this have to do with animation priority or is it a fault in my scripting?
Logically it has to do with the fact that every frame the Camera’s CFrame is being overridden with the FakeCamera’s one, so how do I get around this?