Player Argument must be a Player Object

When the player hits the other player’s shield after a certain number of times, it breaks and fires a remote event telling the other player to destroy the sword/tool that comes with the shield. However, how would I go about firing the remote event for the other player on the receiving end? Here’s what I’ve tried so far, which gives me this error: https://gyazo.com/99b34b035b9413235a9258110f4b236b
(Server Script)

if hit.Parent:FindFirstChild("Humanoid").Blocking.ShieldCount.Value == 0 then
	if hit.Parent:FindFirstChild("Shield") and ShieldDB then
		hit.Parent.Shield:Destroy()
		local Broke = game.ReplicatedStorage.WeaponEvents.BrokeShield
		Broke:FireClient(hit.Parent.Parent)	 			
		ShieldDB = false	
	end
end	
1 Like

The issue is that FireClient takes in a Player object as the first argument, which specifies the client that the event gets fired to.

Try something like this:

Character = hit.Parent
Player = game.Players:GetPlayerFromCharacter(Character)
Broke:FireClient(Player, hit.Parent.Parent)
1 Like