BodyPosition is correct, but part goes to wrong position

in that gif I was using alignposition and alignorientation along with a custom attachment that i add in characteradded. this is how my studio looked and here is the script i used:

game.Players.PlayerAdded:Connect(function(v)
	v.CharacterAdded:Connect(function(d)
		game.ServerStorage.Part.PartAttachment:Clone().Parent = d:WaitForChild('Head')
       local ao = Instance.new('AlignOrientation', d:WaitForChild('Head'))
       local ap = Instance.new('AlignPosition', d:WaitForChild('Head'))
	    ao.Attachment0 = workspace.Part.Attachment
	    ao.Attachment1 = d:WaitForChild('Head'):WaitForChild('PartAttachment')
	    ap.Attachment0 = workspace.Part.Attachment
		ap.Attachment1 = d:WaitForChild('Head'):WaitForChild('PartAttachment')
	end)
end)

(script is kinda messy cause i was just doing it manually in studio but does show how to do it)

2 Likes