Carry system bug

Hey the script I made works except when It comes to the clean up
it wont delete the rope and attachments

Prompt.Triggered:Connect(function(plrTrigger)
	print("Triggered")--
	local echaracter = plrTrigger.Character
	local Character = Prompt.Parent.Parent
	print(drag)--
	spawn(function()
	print("Waiting for unstun variable")--
		
		--------------------------------------------------------------------------------------------
		while Character.ConfigValue.StunValue.Value == true do
			wait(1)
			print("Counting")--
			end
			
			if Character.ConfigValue.StunValue.Value == false  then
				print("Clean up")
				attach:Destroy()
				attach2:Destroy()
				rope:Destroy()
	end
		--------------------------------------------------------------------------------------------

It is in a spawn function as you can see

print("Clean up")

Does this print?

If StunValue isn’t a BoolValue then neither while or if statement will run and you will not see either print “Counting” or “CleanUp”.

What does your log look like?

no
it doesn’t print which is an issue

it is a Boolean value (Char limit)

this is the output

11:06:23.573 Triggered - Server - DragPlayer:23
11:06:23.573 false - Server - DragPlayer:26
11:06:23.574 Drag - Server - DragPlayer:46
11:06:23.574 noxomos - Server - DragPlayer:48
11:06:23.576 noxomos - Server - DragPlayer:49
11:06:23.578 Drag - Server - DragPlayer:50
11:06:23.633 Waiting for unstun variable - Server - DragPlayer:28
11:06:24.640 :arrow_forward: Counting (x6) - Server - DragPlayer:33
11:06:30.490 UnStun - Server - ToolStun:114

This is Decerpted and slow and should not be used instead try

task.spawn(function()