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?
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)
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.
-- 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)
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.