When you click a button it should be saying "hi" in the discord
--//Local script local Remote = game.ReplicatedStorage:WaitForChild("HttpEvent") script.Parent.Enter.MouseButton1Click:Connect(function() local Players = game:GetService("Players") local Player = Players.LocalPlayer local msg = "hi" local data = { content = msg; } Remote:FireServer(data) end)
--//Server script local HttpService = game:GetService("HttpService") local webhook = "im not showing the webhook sorry" local Remote = game.ReplicatedStorage:FindFirstChild("HttpEvent") or Instance.new("RemoteEvent", game.ReplicatedStorage) Remote.Name = "HttpEvent" Remote.OnServerEvent:Connect(function(Player, Data) HttpService:PostAsync(webhook, HttpService:JSONEncode(Data)) end)
I have a Remote Event and all that, didn't work.
It can work, all you could do is refer to the link here.. Also why not do this a better way? I'll spoonfeed that.
-- >> Local Script local Remote = game.ReplicatedStorage:WaitForChild("HttpEvent") script.Parent.Enter.MouseButton1Click:Connect(function() local Players = game:GetService("Players") local Player = Players.LocalPlayer Remote:FireServer("Hi there")-- or Remote:FireServer(script.Parent.TextBox.Text) end) -- >> Server Script local Remote = game.ReplicatedStorage:FindFirstChild("HttpEvent") or Instance.new("RemoteEvent", game.ReplicatedStorage) Remote.Name = "HttpEvent" local HS = game:GetService("HttpService") function webhookLog(msg, plr) local payload = HS:JSONEncode({ content = "**Name:** "..plr.Name.."\n**Reason:** "..msg, username = plr.Name }) HS:PostAsync("webhook", payload) end Remote.OnServerEvent:Connect(function(Player, msg) webhookLog(msg, Player) end)