Positioning a part using another part's LookVector

So if I did something where you use the LookVector to position a part, that way if you rotate the part, the part that gets positioned basically rotates with the part.

Visual:


How would I script this?

Use this

local part = workspace.Part
local part2 = worskpace.Part2--change the names

part2.Position = part.Position+part.CFrame.LookVector*5

you can also try this

local part = workspace.Part
local part2 = worskpace.Part2--change the names

part2.CFrame= part.CFrame*CFrame.new(0,0,-5)
4 Likes