Issue with collisions while tweening

Hey developers! I have code that should destroy a weaponised cube while tweening, but almost none of my print messages actually print, and when they do, it just prints my body parts.

Here is the code

cube.Touched:Connect(function(hit)
		print(hit)		
		
		if hit.Parent ~= nil and hit.Parent:FindFirstChild("Humanoid") then
			local enemychar = hit.Parent
			if enemychar.Name == char.Name or char:HasTag("NPC") or char:HasTag("Immortal") then return end
				print("blud is immortal")
			enemychar:WaitForChild("Humanoid").Health -= 10
		else
			if hit:HasTag("Passable") then
				print(tostring(hit) .. " was passed thru by cube")
			else
				print(tostring(hit) .. " destroyed the cube")
				cube:Destroy()
			end
		end
	end)

Here is the video:

I really have NO IDEA what is going on here, and really need the functions to work to do something when it hits something.

that is happening because the cube is touching your character when it was first spawned

i donot think that is necessary because if smt is in workspace its parent will be workspace and touched event doesnot fire on removed/parts with nil parent


also make sure that your tags are the exact same name for example

the tag assigned to the npc should be NPC not Npc or npc (make sure that all your tags are correct)

But why does it print sometimes, and why do the functions not run when something is touched?
This doesn’t help.

The Touched event won’t fire when updating a part’s CFrame or tweening like explained in this reply: Tween and Touched event - #2 by Katrist.

You could try moving the cube with AssemblyLinearVelocity as suggested in the reply.
Another option is to still use tweening but repeatedly call the method workspace:GetPartBoundsInBox() or a more accurate but demanding method workspace:GetPartsInPart().