I need help offsetting a part with code

This is a super simple problem, I’m basically trying to make a part using Instance.new(“Part”), welding it to the player’s head, and having it be above the player’s head. I have everything down, but I can’t quite figure out how to offset the part on the Y axis. I tried Vector3.new(HeadPosition, HeadPosition + 1, HeadPosition) but I guess you can’t use arithmetic in Vector3s.

local LP = game.Players.LocalPlayer
local HeadPosition = LP.Character.Head.Posistion
local Part = Instance.new("Part")
Part.Name = "Part"
Part.Parent = LP.Character
Part.Position = Vector3.new(HeadPosition, HeadPosition + 1, HeadPosition)
Part.Size = Vector3.new(1,1,1)
Part.Massless = true
Part.CanCollide = false
local weld = Instance.new("WeldConstraint")
weld.Parent = LP.Character:FindFirstChild("Part")
weld.Part0 = LP.Character:FindFirstChild("Part")
weld.Part1 = LP.Character.Head

Thank you!

I think you spelled position wrong.

Part.Position = Vector3.new(HeadPosition.X, HeadPosition.Y + 1, HeadPosition.Z)

or

Part.Position = HeadPosition + Vector3.new(0, 1, 0)
2 Likes

Thank you, you’re a life saver