Hello! S need to move camera by parabolic trajectory while player is moving(for making camera blobbing)but camera is not moving by parabolic trajectory. Here's my code(based on this post: https://devforum.roblox.com/t/movement-along-a-parabolic-trajectory/622730):
local plr = game.Players.LocalPlayer
local humanoid = plr.Character.Humanoid
local camera = workspace.CurrentCamera
-- Camera configuration
camera.CameraType = Enum.CameraType.Scriptable
-- Camera Blobbing
while humanoid.MoveDirection.Magnitude > 0 do
wait()
local t = tick() -- Get the current time
local y = math.abs(math.cos(t) * 5) -- Compute the Y position
local z = math.abs(math.sin(t) * 5) -- Compute the Z position
camera.CFrame = CFrame.new(Vector3.new(0, y, z)) -- Update the camera's position
end
** You are now Level 2! **