How can I make a part always face a certain way relative to the camera

So sorry if the tile wasn’t very explanatory I personally don’t know how to do or explain this but I’m going to try my best. So I have a part with a particle emitter I want the part to follow inside of the camera and shoot particles forward like this;

I achieved this result like so (btw the particles are coming from the bottom of the part top of the part)

local runService = game:GetService('RunService')
local part = workspace.Part
local camera = workspace.CurrentCamera

local character = game.Players.LocalPlayer.CharacterAdded:Wait()

runService.RenderStepped:Connect(function()
	part.CFrame = CFrame.new(camera.CFrame.X, camera.CFrame.Y, camera.CFrame.Z) * CFrame.Angles(math.rad(90), 0, 0)
end)

so as you see I achieved the result I wanted however if you saw when I turned around the part will not turn with the camera. how do I make it so that the bottom surface of the part is always facing the same way as the front of the camera?

You can use LookVector

I do understand this and I’ve been trying to incorporate it but that’s the problem I don’t quite understand how to incorporate look vector to give me the desired result.

local runService = game:GetService('RunService')
local part = workspace.Part
local camera = workspace.CurrentCamera

local character = game.Players.LocalPlayer.CharacterAdded:Wait()

runService.RenderStepped:Connect(function()
	part.CFrame = camera.CFrame + (camera.CFrame.LookVector * Vector3.new(2, 2, 2))
end)
2 Likes