How to get camera direction

How i can get player camera direction?
To indicate the direction of force for part
Like this:

I tried make it:

local cameraDirection = game.Workspace.CurrentCamera.CFrame.LookVector

But it prints only one value:
“-0, -0.6246952414512634, -0.780868649482727”

Thanks for answer

Is this a local script or regular?

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local rootpart = character:WaitForChild("HumanoidRootPart")
local cameraDirection = rootpart.CFrame.Position + workspace.CurrentCamera.CFrame:ToEulerAnglesYXZ()

Are you sure your getting the lookvector from the client? The server doesnt have a moving camera.

Uhh it’s my mistake. I don’t know how it happened, but I didn’t put value in cycle sry thx all.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.