Part Parenting/Destruction Issue

Hello Developers,

I was recently making a game which included combat mechanics, so I added a medkit for healing. The problem is, that I want the Handle of the Tool/Medkit to be parented to the Workspace before the tool gets destroyed (tool gets destroyed when it’s done being used). Now, this is really simple, right? You just clone the Handle, and parent it to workspace! Well, I tried that, and it didn’t work.

Here’s a clip showing the issue. (sorry if it’s laggy because i have no dedicated gpu)

It destroys the cloned part. It’s Cancollide is on.

Any Help is Appreciated,
OceanTubez

Can’t seem to replicate. Are you 100% sure you’re parenting the cloned object and not the original handle?
Would be great if you could share some code

It is probably falling through the baseplate and into the void, thus causing it to despawn. Enable cancollide properties or anchor it

Cancollide is on, and anchoring it would make it’s physics stop.
I want the physics too.


local tool = script.Parent
local handle = tool:WaitForChild("Handle")

local useanim = tool:WaitForChild("Use")

local loadedidle

local usebool = tool:FindFirstChild("HasBeenUsed")

tool.Activated:Connect(function()
	
	if usebool.Value == false then
		
		--loadedidle:Stop()
		
		local char = tool.Parent
		local human = char:WaitForChild("Humanoid")
		
		local load = human:LoadAnimation(useanim)
		load:AdjustSpeed(0.85)
		
		load:Play()
		
		human.WalkSpeed = 4
		
		load.Stopped:Wait()
		
		human.Health += 85
		human.WalkSpeed = 16
		usebool.Value = true
		
		local clone = handle:Clone()
		clone.Parent = game:GetService("Workspace")
		handle:Destroy()
		
		task.wait(0.25)
		
		tool.Parent = game:GetService("ReplicatedStorage"):WaitForChild("UsedItems")
		
	end
	
end)

ServerSided.

On my studio, when I include this part I get the same results as you.
Add clone.CanCollide = true after parenting to the workspace. It fixed it for me (I think the handle is automatically made cancollide false when you equip it)

Thanks you so much!
It worked beautifully! My bad, I forgot tools automatically make handle’s cancollide off to make them stick in your hand :man_shrugging: