ive made my obby game where if you touch a winpad you get a discord message from bot (webhook) aaand i want to make it with username for example “shilins_garlend has beaten bla bla bla” and i dont know how to do it.
code:
local HttpService = game:GetService("HttpService")
local part = workspace.touchPart
local debounce = true
local webhook = "https://discord.com/api/webhooks/1254361501351804949/i4Af2qavM0Z-KBRSvmmNxQKRh8qGVl2xXmFyhBF1CL3wYo1mHBLM69OMnTW1xsz-NQ2w"
part.Touched:Connect(function(hit)
local h = hit.Parent:findFirstChild("Humanoid")
if h~=nil and debounce then
debounce = false
local usernam = h.Parent.Name
local data = {
content = "has beaten i love these curves! :remorseless:",
username = usernam.." - (PlayerID#"..game.Players:GetUserIdFromNameAsync(usernam)..")"
}
HttpService:PostAsync(webhook, HttpService:JSONEncode(data))
wait(3)
debounce = true
end
end)