AlignPosition works, but when part isnt anchored or cancollide is off, part falls down and gets deleted

Isn’t alignPosition supposed to keep an attachment alligned with another attachment, well it’s doing that but only for the x and z axis, I can’t get it to work for the y axis

1 Like

Here is an example of how to use align position.

Maybe it will give you the information you need:

game.Players.PlayerAdded:Connect(function(Player)

	Player.CharacterAdded:Connect(function(Character)

		local Part = Instance.new("Part", workspace)
		Part.CanCollide = false

		local PlayerAttachment = Instance.new("Attachment")
		PlayerAttachment.Position = Character:WaitForChild("Head"):WaitForChild("HatAttachment").Position + Vector3.new(0,3,0)
		PlayerAttachment.Parent = Character.Head

		local PartAttachment = Instance.new("Attachment", Part)
		Part.Position = Character.Head.Position + Vector3.new(0,3,0)

		local AlignPosition = Instance.new("AlignPosition")
		AlignPosition.Parent = Character.Head
		AlignPosition.Attachment1 = PlayerAttachment
		AlignPosition.Attachment0 = PartAttachment


		local RunService = game:GetService("RunService")
		local HumanoidRootPart = Player.Character:WaitForChild("HumanoidRootPart")


	end)

end)
1 Like