Sword Protection

Greetings! A few years have passed since I initially shared this post, and in the ever-evolving world of Roblox, significant changes have taken place. I’ve conceived a new game idea with a simple yet compelling concept: a Medieval Battle featuring sword fights, spear duels, axe clashes, and more—all within the Roblox tool.

Roblox anti-exploit

Given the recent news about Roblox’s concerted efforts to combat exploiting by establishing partnerships with major companies, I’m contemplating the implications for my game. Specifically, my concern revolves around anti-exploit measures for the weapon systems. The primary mechanism for determining damage per player is, of course, the “touched” method. Should I remain vigilant and prioritize considerations related to the evolving landscape of anti-exploit measures, particularly in the context of weapon systems for my game?

1 Like

Are you asking if you should make an anti-exploit for your game or something?

If you are worried about exploiters Firing Remotes to deal damage when they didn’t hit them then make a check for distance between each player on the server and make sure its not over a certain amount (Basically the max range the weapon would swing to)

2 Likes

Well the sword itself has a touched event fire when the hitbox is touched by the enemy. I’m asking if the user could some how change it. But yes, should I make some sort of anti-exploit.

1 Like
-- StarterPlayer > StarterPlayerScripts: SwordProtectionClientScript

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SwordEvent = ReplicatedStorage:WaitForChild("SwordEvent")

local function onSwordHit(sword)
    SwordEvent:FireServer(sword)
end

-- Connect this function to the sword hit event on the client
-- For example, you can use the Touched event for the sword
local sword = workspace.Sword -- Replace with the actual sword reference
sword.Touched:Connect(function(hit)
    local character = hit.Parent
    local humanoid = character:FindFirstChildOfClass("Humanoid")

    if humanoid then
        onSwordHit(sword)
    end
end)

1 Like

I know how to code the swords, I’ve already done that. Thank you though. I’m asking if I should implement an anti-exploit system additionally.

If this is done on the server, no.
Client, yes.

The client can’t modify server values.

This should absolutely be done on the server anyway, otherwise, not only could the client modify the hitbox, but it could also abuse the RemoteEvent that you would inevitably have to utilize to achieve this.

1 Like