Dodge ball throw all messed up

Hello Roblox Devs,

I have created a dodgeball!

What’s the problem?

  1. The ball when given to a player will randomly not work (It’s like a 10% chance (Not Intended))
  2. When the ball is thrown then unequipped, the ball will start flying in all random directions

Video of ball going in random directions:
robloxapp-20230103-1956427.wmv (1.7 MB)

Code inside the Dodgeball:

local db = false
local directon

local Earnings = 50

local debris = game:GetService("Debris")

local Move = true
local Money = false
local Hit = 0
local Creator
script.Parent.PickenTarget.OnServerEvent:Connect(function(player,mouse)
	directon = mouse
	Creator = player
end)

script.Parent.Activated:Connect(function()
	if not db then
		
		db = true
		
		-- Finds Positions
		
		local humanoid = script.Parent.Parent:FindFirstChild("Humanoid")
				
		local WalkValue = humanoid.WalkSpeed
		
		local possition1 = script.Parent.Handle.Position
		local possition2 = directon
		
		local Distance = math.abs((possition1 - possition2).Magnitude)

		if Distance <= 10 then
			
		else
						
			-- Play the animation

			local throwAnim = humanoid:LoadAnimation(script.Throw)
			throwAnim:Play()
			
			humanoid.WalkSpeed = 0

			wait(.4)

			-- Throws the ball
			script.Parent.Handle.ThrowSound:Play()
			script.Parent.Handle.Transparency = 1
			local ball = script.Parent.Handle:Clone()
			ball.Name = "DodgeBall"
			ball.Parent = workspace
			ball.Color = Color3.fromRGB(85, 170, 255)
			ball.Size = Vector3.new(3,3,3)
			ball.Transparency = 0
			ball.CanTouch = false
			ball.CFrame = CFrame.new(script.Parent.Handle.Position + script.Parent.Handle.CFrame.LookVector * 3,directon)

			local attachment0 = Instance.new("Attachment",ball); attachment0.Position = Vector3.new(-.5,0,0); attachment0.Orientation = Vector3.new(0,180,0)
			local attachment1 = Instance.new("Attachment",ball); attachment1.Position = Vector3.new(.5,0,0)
			local trail = Instance.new("Trail",ball); trail.Attachment0 = attachment0; trail.Attachment1 = attachment1

			local bv = Instance.new("BodyVelocity",ball)
			bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
			bv.P = 3000
			
			delay(0.1, function()
				ball.CanTouch = true
			end)

			local ori = 0

			spawn(function()
				while Move == true and wait() do
					ori = ori - .05
					ball.CFrame = ball.CFrame + ball.CFrame.lookVector * 6
					ball.Orientation = Vector3.new(ball.Orientation.X + ori,ball.Orientation.Y, ball.Orientation.Z)
				end
			end)

			-- When a ball touch something

			local RedTeam = game.Teams["Red Team"]

			ball.Touched:Connect(function(hit)
				ball.Transparency = 1
				Move = false
				ball.CanTouch = false
				ball.Anchored = true
				ball.BodyVelocity:Destroy()
				local player = game.Players:GetPlayerFromCharacter(hit.Parent)
			
				if player and player.Team == RedTeam then

					local Hiddenleaderstats = Creator.Hiddenleaderstats

					if Hiddenleaderstats.x2Gamepass.Value == true then
						Creator.Hiddenleaderstats.Coins.Value += Earnings * 2
					end

					if Hiddenleaderstats.x2Gamepass.Value == false then
						Creator.Hiddenleaderstats.Coins.Value += Earnings
					end

					if Hiddenleaderstats.x2XP.Value == true then
						Creator.Stats.Experience.Value += 25 * 2
					end

					if Hiddenleaderstats.x2XP.Value == false then
						Creator.Stats.Experience.Value += 25
					end
					
					local char = player.Character
					local humanoid = char:FindFirstChild("Humanoid")
					humanoid.Health = humanoid.Health -25
					local hitSFX = Instance.new("Sound"); hitSFX.SoundId = "rbxassetid://9117969892"
					hitSFX.Parent = ball
					hitSFX:Play()
				end
				local Effect = script.Parent.Handle.Impact:Clone()
				Effect.Parent = ball
				Effect.Enabled = true
				wait(0.1)
				Effect.Enabled = false
				wait(1)
				ball:Destroy()
				Move = true
				Hit = 1
			end)

			-- Reloading the ball

			humanoid.WalkSpeed = WalkValue

			repeat
				wait()
			until Hit == 1
			Hit = 0
			script.Parent.Handle.Transparency = 0
			db = false
		end
	end
end)

How do I fix these sisues?