You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to achieve where it logs to the discord server as a webhook when you sign it. -
What is the issue? Include screenshots/videos if possible!
As soon as you sit down on the seat, it shows the error. - What solutions have you tried so far? Did you look for solutions on the Developer Hub?
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local GUI = script.Parent.Parent.Parent
local Nametag = script.Parent.Parent.NameLabel
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Pencil:play()
repeat wait(.2)
Nametag.TextTransparency = Nametag.TextTransparency - .1
until
Nametag.TextTransparency <= 0
wait(1)
GUI:Destroy()
end)
game.ReplicatedStorage.RemoteEvent:InvokeServer()
local HttpService = game:GetService("HttpService")
ReplicatedStorage = game.ReplicatedStorage
script.Parent.Changed:Connect(function()
if script.Parent.Occupant then
local plr = game.Players:FindFirstChild(script.Parent.Occupant.Parent.Name)
if plr then
local new = script.Parent.ScreenGui:Clone()
new.Parent = plr.PlayerGui
new.Enabled = true
end
end
end)
function LogToDiscord(user, signed)
local success = pcall(function()
local data = {
content = user.Name .. " has "..signed.." the Recruit Desk! (BY SIGNING YOUR NAME BELOW, YOU ARE AGREEING TO TERMS OF GIVING YOUR SERVICE TO THE USMC AND EVERYTHING YOU DO WILL BE WATCHED DURING THIS COURSE OF TRAINING).";
username = user.Name;
avatar_url = game.Players:GetUserThumbnailAsync(user.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100);
}
HttpService:PostAsync("https://discordapp.com/api/webhooks/*****/*****", HttpService:JSONEncode(data))
end)
end
ReplicatedStorage.RemoteFunction.OnServerInvoke = function(user)
if user then
LogToDiscord(user, "signed")
end
end
This is the script (its a server script) where it logs it to the discord via webhook upon pressing the text button from the LocalScript which then fires the script to send it, but it’s not sending it.
This is the local script inside the text button where you press it to sign your username.
Hierarchy: