How to put a part on the player's right (or left)

I was able to get this loop working that puts the Parts one in front of the player and the other behind it:

while wait(.065) do
	FrontSmoke.CFrame = CFrame.new(char.HumanoidRootPart.Position + Vector3.new(0,5,0) + (char.HumanoidRootPart.CFrame.LookVector * 18))
	BackSmoke.CFrame = CFrame.new(char.HumanoidRootPart.Position + Vector3.new(0,5,0) + (-(char.HumanoidRootPart.CFrame.LookVector * 18)))
end

Basically The parts are “FrontSmoke” and “BackSmoke”, i set the FrontSmoke part CFrame to the player CFrame plus 5 studs of height and add the LookVector times 18, the first is positive (Front) and the second is negative (Back)

I Want to understand how to put a part on the player’s right or left

2 Likes

If you want to place something to the right of a player use RightVector instead of LookVector
Likewise, if you want to place something to the left of a player, negate RightVector like how you did for LookVector

4 Likes

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