I know you can multiply CFrame.lookVector
with a number to a part's position in order to make a part appear in front or behind another part (in this case the player's torso.) But, I'm wondering how you move it's position to the sides or the player.
Here's a script you can edit if you need to:
1 | local Torso = game:GetService( "Players" ).LocalPlayer.Character:WaitForChild( "UpperTorso" ) |
2 | local part = Instance.new( "Part" ) |
3 | part.Position = |
1 | local Torso = game:GetService( "Players" ).LocalPlayer.Character:WaitForChild( "HumanoidRootPart" ) |
2 | local part = Instance.new( "Part" ) |
3 | part.Anchored = true |
4 | local NewPos = CFrame.new( 5 , 0 , 0 ) -- 5 studs to the left of the torso. |
5 | part.CFrame = Torso.CFrame:toWorldSpace(NewPos) |
6 | part.Parent = workspace |