Help With fixing Attachment Positioning Issue

What I am trying to achieve is simply positioning the attachment in a grid 5 x N amount of time behind a specific part to make some sort of pet simulator type pet system its just experimental stuff.

problem is I am having weird issues with the attachment positioning where the further your from a specific point they stretch in a weird way.


local spacing =, 0, 0) -- Change the spacing between attachments as needed

local attachments = {}

-- Function to update attachment positions
local function updateAttachmentPositions()
	local partPosition = part.Position
	local partRotation = part.Rotation

	for i = 1, 5 do
		for j = 1, N do
			local attachmentIndex = (i - 1) * N + j
			if not attachments[attachmentIndex] then
				local newAttachment ="Attachment")
				newAttachment.Parent = part -- Attach the new attachment to the part itself
				attachments[attachmentIndex] = newAttachment
			local attachmentPosition = partPosition + partRotation:vectorToWorldSpace(spawnOffset) + partRotation:vectorToWorldSpace(spacing * (j - 1))
			attachments[attachmentIndex].Position = attachmentPosition
		partPosition = partPosition + partRotation:vectorToWorldSpace(, 0, -5)) -- Adjust the vertical spacing as needed

-- Call the update function initially

-- Update attachment positions on each heartbeat
local runService = game:GetService("RunService")

Any help would be amazing!

An Attachment has this Position built in. It also has a WorldCFrame Position as well, but you don’t need that.
Just set the value of the Position (it’s a Vector3 value) to 0,0,-5 or whatever works for the Part you are placing it into. If the Part Orientation is rotated then the Attachment will rotate with it.

so there is no need to update their position once set right?

1 Like

No, because the relative Position never changes.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.