How do I protect this damage remote from exploiters?

I am making a melee as of now, but I have noticed that exploiters can do freely RemoteEvent:FireServer(“Damage”,whateverplayernameis) without any punishments.

Is there any way to make exploiting damage impossible or semi-impossible?

Many thanks.

This is how I do:

	if Action == "Damage" then
		if Character.StatsFolder.Stunned.Value == false and Character.StatsFolder.AttackStun.Value == true then
			local AffectedCharacter = Humanoid.Parent
			local HRP = AffectedCharacter:FindFirstChild("HumanoidRootPart")
			if (Character.HumanoidRootPart.Position - HRP.Position).magnitude < 3.6 then

You should be fine since it looks like you’re already checking the players magnitude before attacking

From the code you have provided I do not have a clear understanding on what you are doing with this damage part. Could explain further what it does.

Be more expandable with your code, give the remote cooldowns for each move string (based off the player), let the remote execute differently each time depending on the move.

You should have server sided cooldowns.

1 Like

From what it looks like, you don’t have any cooldowns so you need to add server-sided cooldowns.

local cooldown = false
if not cooldown then
cooldown = true
wait(3)
cooldown = false
end

(Sorry for improper formatting)
Also, I don’t recommend giving the client the ability to fire remotes for actions (damaging, stunning, etc.). It should all be on the server.

I see, what you mean by string exactly? Since the melee is just an M1 attack and that’s really it.

I’ll be working on server-sided cooldowns for now.

Sorry for the delay, I was busy.
By string I meant not only an actual string, but also any method for the server to realize what move is being fired and what cooldown it should initiate.

Think of it as an hybrid system instead of a simple damage remote.

This will be debounce for all players in the server, I don’t recommend it for things like attacking etc., result of this will be unable to attack for whole server.

You can do tool weapons / sword without any remotes server.

1 Like