Hello devforum,
I’m currently working on webhook reliant resources to use later in other games (this was in my previous post)
The webhook code works as intended, but when I make it reliant on an event to be sent then it just stops working completely.
Here is my server script:
local HTTP = game:GetService("HttpService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage.InfoPass
local ProxyURL = "https://discord.com/api/webhooks/xxx/xxx"
Event.OnServerEvent:Connect(function()
local HookData = {
["content"] = "hello",
["embeds"] = {{
["title"] = "I hate this so much",
["description"] = "aaaaaaaaaaaaaa",
["type"] = "rich",
["fields"] = {
{
["name"] = "Field Tests",
["value"] = "ahahahaha ",
["inline"] = true,
}
}
}}
}
local HAPPY = HTTP:JSONEncode(HookData)
HTTP:PostAsync(ProxyURL, HAPPY)
end)
And here is my Localscript:
local RepStore = game:GetService("ReplicatedStorage")
local Event = RepStore:WaitForChild("InfoPass")
local proxi = script.Parent.ProximityPrompt
proxi.Triggered:Connect(function()
Event:FireServer()
end)
If anyone has a possible solution, please reply.
1 post - 1 participant