How do I make this damage unexploitable?

For my game, I made throwing knives that are local, but then I did :FireAllClients() so that the projectile would be smooth. I don’t know any other way to make the knives deal damage on touch other than firing a remote event that carries the hit target and damage and to execute that information fired by a remote event inside of a server script. Since the knives have to use remote events for the damage, I very know well that this is exploitable, how do I prevent this?

CLIENT:

Player.Character:FindFirstChild("Remotes").Damage:FireServer(p.Parent, 1)

SERVER:

Player.Character:FindFirstChild("Remotes").Damage.OnServerEvent:Connect(function(Player, Target, Damage)
		Target:FindFirstChild("Humanoid"):TakeDamage(Damage)
	end)

make a hit detector on the client fire the server “hit”, then verify that they are close enough to be hit and that they arnt knifing too fast then handle the damage on the server

1 Like