So I have made a dragon and want it to be connected to the player and not make it spin around and go crazy. The Dragons Parts are all unanchored and cancollide = false. They are all welded to a hitbox. When I had the dragon following the player it would spin around crazy maybe resizing the hitbox to the size of the dragon would fix it. But it didn’t and this is the result of that.
Script:
local function equipDragon(player,Dragon,Slot)
local char = player.Character
if Dragon ~= nil and char ~= nil then
Dragon.Name = player.Name..Slot
if char:FindFirstChild(player.Name..Slot) then
char[player.Name..Slot]:Destroy()
end
end
if char.HumanoidRootPart:FindFirstChild("AttachChar") then
char.HumanoidRootPart:FindFirstChild("AttachChar"):Destroy()
end
Dragon:SetPrimaryPartCFrame(char.HumanoidRootPart.CFrame)
local DragonStuff = Dragon:FindFirstChild("DragonStuff")
local CurrentModel = Dragon.PrimaryPart.Size
local AttachChar = Instance.new("Attachment")
AttachChar.Name = "AttachChar"
AttachChar.Parent = char.HumanoidRootPart
if DragonStuff.DragonType.Value == "Air" then
AttachChar.Position = Vector3.new(1,1,0) + CurrentModel
elseif DragonStuff.DragonType.Value == "Land" then
AttachChar.Position = Vector3.new(1.5,0.2,0) + CurrentModel
end
local AttachDragon = Instance.new("Attachment")
AttachDragon.Parent = Dragon.PrimaryPart
AttachDragon.Name = "AttachDragon"
local alignPosition = Instance.new("AlignPosition")
alignPosition.MaxForce = 25000
alignPosition.Attachment0 = AttachDragon
alignPosition.Attachment1 = AttachChar
alignPosition.Responsiveness = 25
alignPosition.Parent = Dragon
local alignOrientation = Instance.new("AlignOrientation")
alignOrientation.MaxTorque = 25000
alignOrientation.Attachment0 = AttachDragon
alignPosition.Attachment1 = AttachChar
alignOrientation.Responsiveness = 25
alignOrientation.Parent = Dragon
Dragon.Parent = char
end

