local part = Instance.new("Part")
part.Parent = game.Workspace
part.Anchored = true
part.CFrame = CFrame.new(script.Parent.CFrame.LookVector * 5)
I wanted to change a parts position a certain distance from another parts LookVector, so I Created a test script to see if what I had in mind would work. it did not work and no error came up. can someone show me the correct way to do this?

6 comments
local part = Instance.new("Part") part.Parent = game.Workspace part.Anchored = true part.CFrame = CFrame.new(script.Parent.CFrame.LookVector * 5 + Vector3.new(0,0,-3)) is this what you mean?
exacly
the part only spawns in the same spot at the center of the workspace.
are you sure about that because this is how it went for me, this is without the vector3 https://imgur.com/a/8Z41bBN and https://imgur.com/a/qYv4JpS this is how it went with vector3 https://imgur.com/a/jRHtyvn and https://imgur.com/a/hWvpxep
after looking over your results the position was in fact the same as yours, but its still relativly in the center of the workspace. I tried playing around with the values and moved "script.Parent" in different positions but the new part always goes to the world center. im just trying to get the new part to spawn maybe 5 studs in front of "script.Parent"
I finally found a solution. we were both doing it wrong: local part = Instance.new("Part") print(part.Name) part.Parent = game.Workspace part.Anchored = true part.Position = script.Parent.Position + script.Parent.CFrame.LookVector * 3 print(part.Position)