Hi, I’m making a Discord → Roblox moderation system.
I have the backend on my VPS, so the link in HttpService is IP:PORT but HttpService gives me a Trust check failed error.
What do I do? Here is my code.
(I intentionally replaced the IP and port with 1.2.3.4:1234 to hide the real IP)
local HttpsService = game:GetService("HttpService")
local adminSystem = require(script.Parent.MainModule)
_G.baseUrl = "1.2.3.4:1234"
_G.getRequestEndpoint = "/get-request"
_G.verifyRequestEndpoint = "/verify-request"
if adminSystem:CheckHTTP() == false then
warn("HttpService isn't enabled in the game, deleting core administration files")
adminSystem:Destroy()
script:Destroy()
return
end
while true do
local request
local suc, err = pcall(function()
request = HttpsService:GetAsync(_G.baseUrl .. _G.getRequestEndpoint)
end)
if err then
warn("There was an error while attempting to connect to the administration webserver: " .. err)
end
local newRequest
local s, e = pcall(function()
newRequest = HttpsService:JSONDecode(request)
end)
if s == true then
adminSystem:Run(newRequest.type, newRequest)
end
wait(5)
end