Deal with roblox physics in a part carrying script

please watch the video

As you can see I have a system where the player can pickup models and rotate them (not shown in video), it is in testing as of now but i want to put it into an actual game eventually.

However there are issues, picking up a modelwhile another is still held will cause the 2 to spin rapidly, also if you stand on a modeland then pick it up, when the game attempts to align the model to your character will get sent to low earth orbit. As I’m not good with roblox physics i would like to know what I can do to make everything work normally.

Server Code:

game.Players.PlayerAdded:Connect(function(plr)
	local char = plr.Character or plr.CharacterAdded:Wait()
	
	local partAttach = Instance.new("Attachment")
	partAttach.Position = char:WaitForChild("Head"):WaitForChild("HatAttachment").Position - Vector3.new(0,0,5)
	partAttach.Parent = char.Head
	partAttach.Name = "HeadAttach"
	
	local alignPos = Instance.new("AlignPosition")
	alignPos.Parent = char:WaitForChild("Head")
	alignPos.Name = "Allign"
	alignPos.Mode = Enum.PositionAlignmentMode.TwoAttachment
	alignPos.Responsiveness = math.huge
	alignPos.MaxForce = math.huge
	alignPos.MaxVelocity = math.huge
	alignPos.RigidityEnabled = false
	alignPos.ApplyAtCenterOfMass = true
end)

game.ReplicatedStorage:WaitForChild('Allign').OnServerEvent:Connect(function(player, allign , plrAttach , PartAttachment)
	
	
	if allign ~= nil and plrAttach ~= nil and PartAttachment ~= nil then
		player.Character.Humanoid.WalkSpeed = 0
		print(player.Character.Humanoid.WalkSpeed)
		allign.Attachment1 = plrAttach
		allign.Attachment0 = PartAttachment
	else
		local allign = player.Character.Head.Allign :: AlignPosition
		allign.Attachment0 = nil
		
		player.Character.Humanoid.WalkSpeed = 16
	end
	
end)

client:

local UIS = game:GetService("UserInputService")

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()

local plrAttach = char:WaitForChild("Head"):WaitForChild("HeadAttach")
local allign = char:WaitForChild("Head"):WaitForChild("Allign") :: AlignPosition

local mouse = player:GetMouse()

local DropButton = player.PlayerGui.Holding.Drop

local vert = 0
local hor = 0
local diag = 0

local recentlyEquip = false

local prevPart = nil ::Part
local save = {}


mouse.Button1Down:Connect(function()
	
	local mouseTarget = mouse.Target
	
	local PartAttachment = nil
	local model = mouseTarget:FindFirstAncestorOfClass("Model")
	local attachmentPart = nil :: Part
	
	if model then
		attachmentPart = model:FindFirstChild("Primary")
		if attachmentPart then
			PartAttachment = attachmentPart:FindFirstChild("Attachment")
		end
	end
	
	if PartAttachment ~= nil then

		
		attachmentPart.AssemblyAngularVelocity = Vector3.new(0,0,0)
		
		recentlyEquip = true
		task.delay(1, function()
			recentlyEquip = false
		end)
		
		DropButton.Visible = true
		game.ReplicatedStorage.Allign:FireServer(allign,plrAttach,PartAttachment)
	end
	
end)

DropButton.MouseButton1Click:Connect(function()
	DropButton.Visible = false
	game.ReplicatedStorage.Allign:FireServer(allign)

end)

UIS.InputBegan:Connect(function(input, gp)
	
	if input.KeyCode == Enum.KeyCode.W then
		vert += 10
	end
	
	if input.KeyCode == Enum.KeyCode.S then
		vert -= 10
	end
	
	if input.KeyCode == Enum.KeyCode.D then
		hor += 10
	end
	
	if input.KeyCode == Enum.KeyCode.A then
		hor -= 10
	end
	
	if input.KeyCode == Enum.KeyCode.E then
		diag += 10
	end
	
	if input.KeyCode == Enum.KeyCode.Q then
		diag -= 10
	end
end)

UIS.InputEnded:Connect(function(input, gp)
	
	if input.KeyCode == Enum.KeyCode.W then
		vert -= 10
	end

	if input.KeyCode == Enum.KeyCode.S then
		vert += 10
	end

	if input.KeyCode == Enum.KeyCode.D then
		hor -= 10
	end
	
	if input.KeyCode == Enum.KeyCode.A then
		hor += 10
	end
	
	if input.KeyCode == Enum.KeyCode.E then
		diag -= 10
	end
	
	if input.KeyCode == Enum.KeyCode.Q then
		diag += 10
	end
end)

while task.wait(0.01) do
	if recentlyEquip == false then
		if allign.Attachment0 then
			local targetPart = allign.Attachment0.Parent :: Part
			if targetPart then
				targetPart.CFrame = targetPart.CFrame * CFrame.Angles(math.rad(vert), math.rad(hor), math.rad(diag))
			end
		end
	end
end

That issue is most likely happening due to the fact that you’ve set the AlignPosition’s MaxForce and MaxVelocity to math.huge (infinity), which essentially means that you’ve given it permission to use as much Force/Velocity as necessary to try to align the object’s position to the intended target. Using large but finite values, such as 10000, could fix this problem and might fix the rotation issue as well

The reason it’s set to that is because I don’t want it seem like the object is locked to that position infront of the player and when it’s picked up I want it to go there instantly.

I’ll still try what you suggested and if it works that’s great