Try having an attachment on the front of the arrow, Getting the offset from the attachment position and the Arrow position. Then CFrame the Arrow to the raycastResult.Pos + the offset, then weld it, Sorta like this
local Arrow = Arrow:Clone()
local weld = Instance.new("WeldConstraint", Arrow or Shield)
weld.Part0 = Shield
--WeldConstraint = weld but without screwing over position
ArrowOffset = Arrow.Attachment.Position (since it already is the offset)
Arrow.CFrame = CFrame.new(RaycastResult.Pos + ArrowOffset) --Positioning Arrow with offset
weld.Part1 = Arrow
Arrow.Parent = --Put Arrow Parent Here
--If all goes well, the Arrow will still have the same rotation value
--and it will stick in there
Thats what I would do, Instead of using a weld, position the Arrow first then put it on a weldConstraint
I would get the Direction of the ray somehow, extend the Direction by a bit from the Arrow and make the Arrow point towards the direction using CFrame.new
sorta like
function CastRay()
local Direction
local raycastResult = Casted
if raycastResult.Instance.Name == "Shield" then
local copy = game:GetService("ServerStorage").Arrow:Clone()
local weld = Instance.new("WeldConstraint")
weld.Parent = raycastResult.Instance
weld.Part0 = raycastResult.Instance
local ArrowOffset = copy.Attachment.Position
copy.CFrame = CFrame.new(raycastResult.Position + ArrowOffset)
weld.Part1 = copy
local newPos = copy.Position + (Direction.Unit)*10
copy.CFrame = CFrame.new(copy.Position, newPos)
copy.Parent = raycastResult.Instance
Debris:AddItem(copy, 30)
end
end
Use the Direction variable from earlier in the function