Copied and welded parts to real body make my character freeze and die, what did i do wrong?

So i made a super punch, and b4 you end the animation you’re supposed to glow, how i went about it is copying the bodyparts, welding it to your character and make the size a bit bigger so you can see it, however it makes the animation and the character freeze up and at the end you just die, how do i fix this?

for Index, BodyParts in ipairs(char:GetChildren()) do
		if BodyParts:IsA("BasePart") then
			local BodyPart = BodyParts:Clone()
			BodyPart.CFrame =  BodyParts.CFrame
			BodyPart.Size = Vector3.new(BodyParts.Size.X+.2,BodyParts.Size.Y+.2,BodyParts.Size.Z+.2)
			BodyPart.Color = Color3.fromRGB(255,255,255)
			BodyPart.CanCollide = false
			BodyPart.CanQuery = false
			BodyPart.CanTouch = false
			BodyPart.Massless = true
			BodyPart.Anchored = false
			BodyPart.Material = Enum.Material.Neon
			BodyPart.Parent =  workspace.Effects
			
			local m6d = Instance.new("Motor6D")
			m6d.Part0 = BodyParts
			m6d.Part1 = BodyPart
			m6d.Parent = BodyPart
			
			game.Debris:AddItem(BodyParts, 2)
		end
	end

You’re dying because you are using Debris service to destroy “BodyParts” in 2 seconds which is destroying all your original body parts, I assume you meant to put “BodyPart” not “BodyParts” when using Debris. I’d rename the BodyPart variable to something like “GlowPart” so you don’t accidently do something like this again.

When it comes to the freezing part, sadly I’m unsure as I don’t normally working with Motor6D, Welding, etc.

1 Like

I’ve also not welded the humanoidrootpart, since that freezes me up too, but i havent noticed the game.debris part, thank you so much <3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.