Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to make a part appear besides the player?

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:

local Torso = game:GetService("Players").LocalPlayer.Character:WaitForChild("UpperTorso")
local part = Instance.new("Part")
part.Position =

2 comments

0

CFrame.rightVector? Also replace "UpperTorso" with "HumanoidRootPart"

0

I used UpperTorso because the part is going to be welded to the player, and is supposed to move with the uppertorso.

1 answer

✓ Accepted answer
local Torso = game:GetService("Players").LocalPlayer.Character:WaitForChild("HumanoidRootPart")
local part = Instance.new("Part")
part.Anchored = true
local NewPos = CFrame.new(5, 0, 0) -- 5 studs to the left of the torso.
part.CFrame = Torso.CFrame:toWorldSpace(NewPos)
part.Parent = workspace

This discussion is preserved as it was. New answers, comments, and votes are closed.