So, i made a simple gui that holds an TextBar and a button.
i wanted to make a 'Send message to devs' gui.
And everything is working fine except the Webhook script.
If i just make a simple script to check if the button works, it works.
But if i use my script bellow, nothing happens?
local HTTP = game:GetService("HttpService")
local webhook = "https://discordapp.com/api/webhooks/--My webhook id here"
script.Parent.MouseButton1Click:connect(function(player)
print(player.Name)
local msg = ..player.Name.. " Has pressed 'send'. " -- (just a test line)
local payload = HTTP:JSONEncode({content = msg, username = player.Name.." - (#"..player.UserId..")"})
HTTP:PostAsync(webhook, payload)
print("Complete")
end)
Also, no errorcode appears? help?
The gui + explorer: Linkywinky
