Make part appear behind a player then follow player but stay at a certain angle relative to how it spawned

Very sorry if the title seems confusing, but I’ll try to clear it up here

Here’s an example of what I want to happen:


Before part spawns


Part spawns


Player moves to different position, with part following


Player turns around, with part being visible

My different attempts resulted in the part always staying behind the player when they look in different directions, and the part spawning according to the world’s axis’s, and not behind the player. Any help would be appreciated!

You need to multiply it by the Head’s Z axis.

part.CFrame = head.CFrame + head.CFrame.ZVector * 5

or

part.CFrame = head.CFrame * CFrame.new(0, 0, 5)

I do that when spawning in the part, but how would I go about making it follow the player while not staying behind them?

local NumberOfStudsFromHead = 3
local BehindVector = -head.Cframe.LookVector*NumberOfStudsFromHead
part.Position = head.Position + BehindVector