My Destroy Tag Value script is not working

Hello, My destroy tags when died script is not working. here it is and hopefully someone can help me fix that isssue.
Here is my code.

		player.CharacterAdded:connect(function(char)
		char.Humanoid.Died:connect(function()
			if player:FindFirstChild("Contestant") then
				
				game.Players.LocalPlayer.Contestant:Destroy()
				elseif player:FindFirstChild("Piggy") then
					
					game.Players.LocalPlayer.Piggy:Destroy()

				
				KeyModule.DropTools(player,game.Workspace.map,char.HumanoidRootPart.Position)
				print("Tools Dropped")
				
			end
		end)
		end)
		end
		end)

Are you checking if the tag exists on the server?
This comes down to replication and FE.

If you delete it on the client, (the localplayer), the changes will only happen to that player. This means it wont replicate or show changes to the server or any other players.

Yes I want to delete the tag locally.

So you only want it to show changes on the one client, then check output and make sure everything has no errors. If you’re creating the tags on the client as well, keep in mind no other player can see it.

Ok then I want to delete it on the client but only to that player if that works and sorry for the confusion lol.

Please tell me how you’re creating the tags.

Here is my script to create the tags and its in another script.

Round.InsertTag(contestants,"Contestant")
	Round.InsertTag({chosenPiggy}, "Piggy")

and then I have code in a module script.
function module.InsertTag(contestants, tagName)
		for i, player in pairs(contestants) do
			local Tag = Instance.new("StringValue")
			Tag.Name = tagName
			Tag.Parent = player
		end
		
	end

What is running this code, a server script or a localscript?

a server script is running this code

Just use “player” don’t use game.Players.LocalPlayer.