Hi,
Im very new to Lua And im trying to make a script that sends a webhook when you touch a brick, However When the player touches the brick it sends Multiple webhooks, Is there a way I can only make it send 1 Webhook?
Heres the code:
local url = "[url]"
local http = game:GetService("HttpService")
script.Parent.Touched:Connect(function(hit)
local Player = game.Players:GetPlayerFromCharacter(hit.Parent
local data = {
['embeds'] = { {
["title"] = "ATTEMPTED BREACH",
["description"] = "ALERT: ["..Player.Name.."] has Tried to enter The [REDACTED] Sector. /n Apprehend "..Player.Name.." **NOW**",
["color"] = 16711680;
["image"] = {
["url"] = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..Player.Name
};
["footer"] = {
["text"] = "Alert Triggered by "..Player.Name,
}
}
}
} local finaldata = http:JSONEncode(data)
http:PostAsync(url, finaldata)
end
end)

2 comments
Thank You Very much!
No problem man!