I have code that deletes the weapon in a players hand and starter gear. It successfully deletes it from the hand, but not from Starter Gear ("hey" does not print). Does anyone know why this is happening?

local function onCreatePartFired(player, tool)
	local SG = player.StarterGear
	if tool then
		tool:Destroy()
	end
	if SG:FindFirstChild(tool.Name) then
		print("hey")
    	SG[tool.Name]:Destroy()
	end
end

1 comment

0

Can you send the full script?