Making A Part Always Spawn In Front Of Another Part

Hey there,

I’ve got a quite simple question to ask. I am looking to make a part spawn 5 studs in front of a character’s head. I want this to change depending on the way the character is facing. I am aware that you would use lookvector for this, just not sure how exactly it works. Any help is appreciated!

local newPart = Instance.new("Part")
newPart.CFrame = player.Character.Head.CFrame.LookVector * 5
newPart.Parent = workspace

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