Tween Service Not working

I am making a boss attack where the boss throws the sword, but the tween doesnt work

local rig = script.Parent
local electricarea = script.Parent.Parent["Electric Area"]
local area = {}
area.CFrame = CFrame.new(-3328.699, 131.421, -4901.823) -- center of arena
area.Size = Vector3.new(1239.84, 226.444, 608.11) -- size of arena
area.OverlapParams = OverlapParams.new()
area.OverlapParams.FilterType = Enum.RaycastFilterType.Whitelist

local walkanim = rig.Humanoid.Run
local loadwalk = rig.Humanoid:LoadAnimation(walkanim)

local swinganim = rig.Humanoid.SwingSword
local loadswing = rig.Humanoid:LoadAnimation(swinganim)

local throwanim = rig.Humanoid.SwordThrough
local loadthrow = rig.Humanoid:LoadAnimation(throwanim)
function getCharactersInArena()
	local whitelist = {}
	for _,player in pairs(game.Players:GetChildren()) do
		if player.Character ~= nil and player.Character:FindFirstChild("HumanoidRootPart") ~= nil then
			table.insert(whitelist,player.Character.HumanoidRootPart)
		end
	end
	area.OverlapParams.FilterDescendantsInstances = whitelist
	local arr = workspace:GetPartBoundsInBox(area.CFrame,area.Size,area.OverlapParams)
	return arr
end

local function findNearestPlayer(boss)
	local characters = {}
	local charactersInArena = getCharactersInArena()

	for _,root in pairs(charactersInArena) do
		local player = game.Players:GetPlayerFromCharacter(root.Parent)
		local arr  = {}
		arr.Player = player
		arr.Character = player.Character
		arr.Position = player.Character.HumanoidRootPart.Position
		arr.Magnitude = (boss.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).magnitude
		table.insert(characters,arr)
	end

	table.sort(characters,function(a,b) return a.Magnitude < b.Magnitude end)
	return characters[1]
end
local canwalk = true
rig.Humanoid.MoveToFinished:Connect(function()
	if canwalk == true then
	--canwalk = false
	loadwalk:Stop()
	loadswing:Play()
	script.Parent["electric twin vfx"]:WaitForChild("HitBoxDamage").Kill.Disabled = false
	wait(1)
	script.Parent["electric twin vfx"].HitBoxDamage.Kill.Disabled = true
	loadwalk:Play()
		--canwalk = true
		end
end)


local TweenService = game:GetService("TweenService")

local shouldthrow = 10
local iflightning = 30
loadwalk:Play()
while wait(1) do
	local root = rig.HumanoidRootPart
	local nearestPlayer = findNearestPlayer(rig)
	if nearestPlayer ~= nil then
		if canwalk == true then
		rig.Humanoid:MoveTo(nearestPlayer.Position)
		print(nearestPlayer.Position)
		shouldthrow = shouldthrow - 1
		if nearestPlayer.Magnitude > 30 and canwalk == true then
				local sword = game.ServerStorage.BossAttacks.TwinBossAttacks:WaitForChild("electrictwinsword"):Clone() -- i clone the sword
				if shouldthrow <= 0 then
				canwalk = false
				loadwalk:Stop()
				loadthrow:Play()
				sword.Parent = workspace
				sword:SetPrimaryPartCFrame(CFrame.new(script.Parent["electric twinvfx"].PrimaryPart.Position))  --i put it into the workspace where the other sword was
				local tweeninfo = TweenInfo.new(2)
				local goal = {
						Position = Vector3.new(nearestPlayer.Position.X, 30.322, nearestPlayer.Position.Z)
					}
					local tween1 = TweenService:Create(sword.PrimaryPart, tweeninfo, goal)
					for i,v in pairs(script.Parent["electric twin vfx"]:GetChildren()) do -- i make the original sword invisible
						v.Transparency = 1
					end
					tween1:Play() -- this tween doesnt play, even though it should
					wait(5)
					for i,v in pairs(script.Parent["electric twin vfx"]:GetChildren()) do
						v.Transparency = 0
					end
					script.Parent["electric twin vfx"].HitBoxDamage.Transparency = 1
					canwalk = true
				shouldthrow = 10
			end
		else
			shouldthrow = 10
			continue
		end
		else
			rig.Humanoid:MoveTo(rig.Parent.Start.Position)
		end
	end
	
end

there are no errors, if you want to look at the full script you can, but the parts that arent working are where there are comments

also, how would i make the sword face the player as its being thrown at the player

Update: so i figured out that the primary part is moving, but the parts that are welded onto the primary part isnt moving, but when i try and change it so it is a cframe, it gives me an error

You probably forgot to change the goal property to CFrame =. CFrame.

Ive done that, but the model still doesnt move. Im not sure why, it is all welded

			local tweeninfo = TweenInfo.new(2)
				local pos = CFrame.new(nearestPlayer.Position.X, 30.322, nearestPlayer.Position.Z)
				local tween1 = TweenService:Create(sword.PrimaryPart, tweeninfo, {CFrame = pos})
				for i,v in pairs(script.Parent["electric twin vfx"]:GetChildren()) do
					v.Transparency = 1
				end
				tween1:Play()

this is the script now

Try using a instance CFrameValue, then set its value to sword:GetPrimaryPartCFrame() .

Then create GetPropertyChangedSignal('Value') function then set the sword:SetPrimaryPartCFrame(value)

How would i do that? what would i do twith the cframe value after i got the cframe

You can disconnect the function once the tween. Completed:wait()

it doesnt let me use getproperty changed signal when i make a variable for gtprimrypartcframe
i want this to happen multiple times so i dont wanna use a disconnect

this is my script now:

			local tweeninfo = TweenInfo.new(2)
					local pos = CFrame.new(nearestPlayer.Position.X, 30.322, nearestPlayer.Position.Z)
					TweenService:Create(sword.PrimaryPart, tweeninfo, {CFrame = pos}):Play()
					local cframevalue = Instance.new("CFrameValue") 
					cframevalue.Value = sword:GetPrimaryPartCFrame()
					cframevalue.Parent = sword
					cframevalue.Name = "CFrameValue"
					cframevalue:GetPropertyChangedSignal("Value"):Connect(function(value)
						sword:SetPrimaryPartCFrame(value)
						print(value)
						end)

but the cframevalue doesnt update