Remote Event not firing to the client sometimes

I have a RemoteEvent that isn’t firing to the client on certain lines, but does on others. Will attach the code and comment on the problem lines.

Players.PlayerAdded:Connect(function(player: Player)
	player.CharacterAdded:Connect(function(char: Model)
		local hrp = char.HumanoidRootPart
		local proximityPrompt ='ProximityPrompt')
		proximityPrompt.RequiresLineOfSight = false
		proximityPrompt.HoldDuration = 0.5
		proximityPrompt.Parent = hrp
		print('delete local proximity prompt for:',player.Name)
		--This remote event is the one that doesn't fire after the player dies
		Remotes.RegisterPlayer:FireClient(player, char) -- Making the proximityprompt non existent on the player's client

		proximityPrompt.Triggered:Connect(function(playerWhoTriggered: Player)
			if playerWhoTriggered == player then Remotes.RegisterPlayer:FireClient(player, char) return end -- RemoteEvent fires here
			print(playerWhoTriggered.Name..' is attempting to 1v1 '..player.Name)
			SendRequest(playerWhoTriggered, player)

What does your client code look like? Add a print on fire, does it output anything to console the first time?

I do have a print statement on the client.

Remotes.RegisterPlayer.OnClientEvent:Connect(function(character: Model)
	print('register player remote is on the client')

It fires the first time but not the second.

If you insist on keeping your proximity prompts on the server (as opposed to the common pattern of client setup → server request), is your script in a container that doesn’t reset, like StarterPlayerScripts? I’d need to test the behavior but it may conflict with firing properly.

Secondly, I assume your server is printing fine? And why pass in the character when the player can access it themselves? It is bad practice to pass Instances over remotes due to numerous reasons.

Would you recommend loading the proximity prompts on the client and then passing them to the server?

Yes, this guarantees proximity prompts will exist on the client and you don’t have to create one for yourself. Then, you can send a signal to the server to do the task you are trying to do.