I am currently making an Anti-Cheat that logs kicks onto a Discord Webhook. How it’s set up is you get a local script, module script, and one server script. Inside StarterCharacterScripts, you have the module script inside the local script, the local script will require() the module script then destroy its self. Preventing exploiters from disabling. The problem is that I cant fire the remote that is inside the module script to send data to the webhook. It doesn’t load in right with the WalkSpeed check function is what another person said, here is the script.
Wont be showing the Server Script, it works fine its just the remote event that is the problem
Local Script:
require(script:WaitForChild("ValidModule"))
script:Destroy()
Module Script (Will Go up to the function that i have problems with)
local KickMessage = "Exploits Detected! Contact valid4593 if this is a mistake!"
local RepStorage = game:GetService("ReplicatedStorage")
local AntiCheatEvent = RepStorage.RemoteEvents:WaitForChild("AntiCheat")
local Settings = {
MaxWalkSpeed = 25,
Other = true
}
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local RunService = game:GetService("RunService")
Humanoid.Changed:Connect(function()
if Humanoid.WalkSpeed > Settings.MaxWalkSpeed then
AntiCheatEvent:FireServer(Humanoid.WalkSpeed)
Player:Kick(KickMessage)
end
end)
There are no errors