Problem detecting cloned models (players) being removed

I have a gun that morphs the hit players into a cloned model.
I also have another weapon that kills the cloned models (players).
The problem is that I am unable to detect when those cloned models (players) are removed (this is supposed to be a scoring event). Any help greatly appreciated.

1 Like

you could always check for a changed event and check whether it is still there.

model.Changed:Connect(function()
    if not model.Parent then
        --destroyed/removed.
    end
end)
1 Like

Adding on to this, you can use the Instance.AncestryChanged event to do the same thing but a touch more efficiently/correctly.

1 Like

Thanks for the help.
I ended up doing it this way:

workspace.DescendantRemoving:Connect(function(obj)
	if obj.Name == "Spider" then
		local status = game.ReplicatedStorage:WaitForChild("StatusG")	
		status.Value = status.Value +1
	end
end)