Why is the part not destroying

script:

local rep = game:GetService("ReplicatedStorage")
local rem = rep:WaitForChild("RemoteEvent")


local ts = game:GetService('TweenService')
local uis = game:GetService("UserInputService")
local Players = game:GetService("Players")

rem.OnServerEvent:Connect(function(plr)
	local animation = Instance.new("Animation")
	animation.AnimationId = "rbxassetid://8756182880"
	local sound = Instance.new("Sound", game.Workspace)
	sound.SoundId = "rbxassetid://894730758"
	sound.Looped = false
	sound.Volume = 3
	local char = plr.Character or plr.CharacterAdded:Wait()
	local union =  Instance.new("Part")
	
	union.Shape = Enum.PartType.Ball
	
	union.Material = Enum.Material.SmoothPlastic
	union.BrickColor = BrickColor.new("Electric blue")
	union.Name = "conquerorhaki"
	union.Parent = workspace

	local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Elastic)
	local Info = TweenInfo.new(0.6)
	local tweeninfo2 = TweenInfo.new(1)
	
	local goal2 = {Size = Vector3.new(0.001, 0.001, 0.001)}
	
	local goal = {Size = Vector3.new(33.976, 33.976, 33.976)}
union.Transparency = 0.5
	local tween = ts:Create(union, tweenInfo, goal)
	local tween2 = ts:Create(union, tweeninfo2, goal2)
	local Tween3 = ts:Create(union,Info,{Transparency=1})
	union.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,1,0)
	union.Anchored = true
	union.CanCollide = false
	tween:Play()
	for i, player in pairs(Players:GetPlayers()) do
		if player ~= plr then
			if player.Character then
				local Humanoid = player.Character:FindFirstChild("Humanoid")
				local animationTrack = Humanoid:LoadAnimation(animation)
				local walkspeed =  Humanoid.WalkSpeed 
				if Humanoid then
					Humanoid.WalkSpeed = 0
					animationTrack:Play()
			
					sound:Play()
					sound.Playing = true
	wait(3)
	tween2:Play()

	
	Tween3:Play()
					
				
	
	wait(3)
				
					
					Humanoid.WalkSpeed = walkspeed		
					animationTrack:Stop()
					union:Destroy()	
					sound:Stop()
					sound.Playing = false
			
					
					
				
				end
			end
		end
	end

end)

its a normal script in workspace and a local script in starter pack and a remotevent in replicated storage

This script is slightly sloppy near the end, do you mind posting some pictures of any errors that show in Output or the locations of your objects in the Explorer?

well ill give u a vid will that be good?
just edit your messsage

Yes, anything useful will help me to understand :+1:

I have a good idea, try using :AddItem from the Debris service, this allows you to eliminate a part with a given time. When you also go to test next time, please open Output so you can find any errors that occur.

nope no errors
Screenshot (110)

Did you try AddItem like I suggested?

nope still not working
script:

local rep = game:GetService("ReplicatedStorage")
local rem = rep:WaitForChild("RemoteEvent")
local debris = game:GetService("Debris")

local ts = game:GetService('TweenService')
local uis = game:GetService("UserInputService")
local Players = game:GetService("Players")

rem.OnServerEvent:Connect(function(plr)
	local animation = Instance.new("Animation")
	animation.AnimationId = "rbxassetid://8756182880"
	local sound = Instance.new("Sound", game.Workspace)
	sound.SoundId = "rbxassetid://894730758"
	sound.Looped = false
	sound.Volume = 3
	local char = plr.Character or plr.CharacterAdded:Wait()
	local union =  Instance.new("Part")
	
	union.Shape = Enum.PartType.Ball
	
	union.Material = Enum.Material.SmoothPlastic
	union.BrickColor = BrickColor.new("Electric blue")
	union.Name = "conquerorhaki"
	union.Parent = workspace

	local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Elastic)
	local Info = TweenInfo.new(0.6)
	local tweeninfo2 = TweenInfo.new(1)
	
	local goal2 = {Size = Vector3.new(0.001, 0.001, 0.001)}
	
	local goal = {Size = Vector3.new(33.976, 33.976, 33.976)}
union.Transparency = 0.5

	local tween = ts:Create(union, tweenInfo, goal)
	local tween2 = ts:Create(union, tweeninfo2, goal2)
	local Tween3 = ts:Create(union,Info,{Transparency=1})
	union.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,1,0)
	union.Anchored = true
	union.CanCollide = false
	tween:Play()
	for i, player in pairs(Players:GetPlayers()) do
		if player ~= plr then
			if player.Character then
				local Humanoid = player.Character:FindFirstChild("Humanoid")
				local animationTrack = Humanoid:LoadAnimation(animation)
				local walkspeed =  Humanoid.WalkSpeed 
				if Humanoid then
					Humanoid.WalkSpeed = 0
					animationTrack:Play()
			
					sound:Play()
					sound.Playing = true
	wait(3)
	tween2:Play()

	
	Tween3:Play()
					
				
	
	wait(3)
				
					
					Humanoid.WalkSpeed = walkspeed		
					animationTrack:Stop()
				
					sound:Stop()
			debris:AddItem(union,6)				
					
				
				end
			end
		end
	end

end)

Try printing a letter after each line of code near the end and see where it stops.

it got up to line 6
script:

local rep = game:GetService("ReplicatedStorage")
local rem = rep:WaitForChild("RemoteEvent")
local debris = game:GetService("Debris")

local ts = game:GetService('TweenService')
local uis = game:GetService("UserInputService")
local Players = game:GetService("Players")

rem.OnServerEvent:Connect(function(plr)
	local animation = Instance.new("Animation")
	animation.AnimationId = "rbxassetid://8756182880"
	


	local char = plr.Character or plr.CharacterAdded:Wait()
	local union =  Instance.new("Part")
	
	union.Shape = Enum.PartType.Ball
	
	union.Material = Enum.Material.SmoothPlastic
	union.BrickColor = BrickColor.new("Electric blue")
	union.Name = "conquerorhaki"
	union.Parent = workspace

	local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Elastic)
	local Info = TweenInfo.new(0.6)
	local tweeninfo2 = TweenInfo.new(1)
	
	local goal2 = {Size = Vector3.new(0.001, 0.001, 0.001)}
	
	local goal = {Size = Vector3.new(33.976, 33.976, 33.976)}
	
union.Transparency = 0.5
	print("2")
	
	local tween = ts:Create(union, tweenInfo, goal)
	local tween2 = ts:Create(union, tweeninfo2, goal2)
	local Tween3 = ts:Create(union,Info,{Transparency=1})
	union.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,1,0)
	print("3")
	union.Anchored = true
	print("4")
	union.CanCollide = false
	print("5")
	tween:Play()
	print("6")
	for i, player in pairs(Players:GetPlayers()) do
		if player ~= plr then
			if player.Character then
				local Humanoid = player.Character:FindFirstChild("Humanoid")
				local animationTrack = Humanoid:LoadAnimation(animation)
				local walkspeed =  Humanoid.WalkSpeed 
				if Humanoid then
					Humanoid.WalkSpeed = 0
					print("7")
					animationTrack:Play()
					print("8")
			
				
					wait(3)
					
	tween2:Play()
print("9")
	
					Tween3:Play()
					print("10")
					
				
	
	wait(3)
				
					
					
					animationTrack:Stop()
				print("11")
				
			debris:AddItem(union,6)				
					print("12")
				
				end
			end
		end
	end

end)

and what i want is when u press e other players (but not u the person who used it) who is inside the ball freezes and do a animation and when the counter is finished they return back to normal and their speed goes back to normal its like an aoe stun

So basically it can’t read any of the players if it stops at 6 then? Weird.