Hello everybody its been quite a while since I last posted a question here but I have come to a stone wall where I'm not sure as to how to go about finishing my Anticheat system as I need it to run the checks on the server side so players can't just bypass the exploit system, below I have listed what I currently have any help/explanation of how to go about doing this would be great!
I have been trying to work on this system for almost 10 hours now using different methods but only had one that worked but it only showed the message locally to the local players' chat, not server-side.
Server Script
local player = game.Players.LocalPlayer
local character = player.Character
local Humanoid = character:FindFirstChild("Humanoid")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ExploitAlerts = ReplicatedStorage:WaitForChild("ExploitAlerts")
function exploitsystem()
if Humanoid.WalkSpeed > 16 then
Humanoid.WalkSpeed = 16
ExploitAlerts:FireAllClients("Speed Exploiting")
end
end
Humanoid.StateChanged:Connect(exploitsystem)
Local Script within starter gui
local Humanoid =script.Parent:FindFirstChild("Humanoid")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ExploitAlerts = ReplicatedStorage:WaitForChild("ExploitAlerts")
ExploitAlerts.OnClientEvent:Connect(function(player, exploitname)
local bc = BrickColor.new("Bright red")
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "[SYSTEM] "..player.Name.."is possibly "..exploitname.." please call a moderator!";
Font = Enum.Font.Cartoon;
Color = bc.Color;
FontSize = Enum.FontSize.Size96;
})
end)

2 comments
I'm kind of confused by this. Last I checked you couldn't get the "LocalPlayer" in a .. server script.. isn't the whole point of a server script that it /isn't/ local?
Also beyond that, try taking the event out of ReplicatedStorage and putting it in workspace or something. Just a hunch.