Hello! I want to make a part that is in front of the player. But I don’t know how to set the position. Is the script like this?
local part = Instance.new("Part",game.Players.LocalPlayer.Character)
part.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.LookVector * 2
You’re setting the part’s position to the “offset” that you want, to correct the code you can do something like this:
local Character = game.Players.LocalPlayer.Character
local part = Instance.new("Part", Character)
part.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2)
for this i used CFrame instead of LookVector since it’s tied directly to the orientation of a part