hs = game:GetService("HttpService") function script.Parent.RemoteFunction.OnServerInvoke(player, url) local response = hs:GetAsync(url) return response end
So, I'm working on a discord message interface surfacegui that will display Discord messages on a SurfaceGui inside of ROBLOX, using a Node.js backend to fetch messages, channels. and more for a Discord bot that will be put in a guild. I can't seem to get my remotefunction for HTTP requests to work, yet when I try using getasync normally from a script, rendering and everything works, and I can print normally. With the remotefunction, I'm pretty sure it returns something empty, as I cannot index anything.
Response should be instant. Any help?
Firing it with
request = game.ReplicatedStorage.RemoteFunction local messageresult = request:InvokeServer("http://no.ip.for.you:noportforyou/discordget/fetchmessages/309898788900831233/30") messageresult = hs:JSONDecode(messageresult)
This works perfectly fine in a script, normally using GetAsync.