I want to make a discord system in which if someone uses a speed hack it will kick them then send a discord message. The kick system does work but the send discord message is not working.
This is the script I have in SSS
local WebhookURL = "https://discord.com/api/webhooks/xxxxx/xxxxx
local Discord = game.ReplicatedStorage.Discordlocal HTTP = game:GetService(“HttpService”)
function Discord.OnServerInvoke(player, msg)
local msg = player.Name…" Has been kicked for exploiting/hacking"
local payload = HTTP:JSONEncode({
content = msg,
username = player.Name
})HTTP:PostAsync(WebhookURL, payload)
return “Kicked”
end
The script I have in Starter Player Script is
local Players = game:GetService(“Players”)
local LocalPlayer = Players.LocalPlayer
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local remoteEvent = ReplicatedStorage:WaitForChild(“Discord”)repeat wait() until LocalPlayer.Character
while true do
wait()
if LocalPlayer.Character.Humanoid.WalkSpeed ~= 16 then
LocalPlayer:Kick(“Speed Exploiting”)
remoteEvent:FireServer()
wait(10)
end
end
I don’t understand what is wrong. Also I put webhook as XXX bc its better to be not revealed