So, i’m very fed up of this and i have tried like a million things.
The serverscript needs to recieve a string sent by localscript. It will send a message to webhook.
This is what it should send:
And this is the result:
Please help me out. I’m literally about to abandon this project.
These are my scripts:
Local:
local player = game.Players.LocalPlayer
game.ReplicatedStorage.PaymentSucessBusFirst.OnClientEvent:Connect(function()
local check = math.random(300,400)
local reciept1 = math.random(10000,99999)
local reciept2 = math.random(100,999)
script.Parent.text1.Text = "Printing reciept..."
script.Parent.ProcessingFirst.checkingnumber.Text = ("Checking Number: Ibis " .. check)
script.Parent.ProcessingFirst.recieptno.Text = ("Reciept " .. reciept1 .. game.Players.LocalPlayer.UserId .. reciept2 .. "110")
wait(math.random(3,25))
script.Parent.ProcessingFirst.Visible = true
-- code after here is most relevant
local sendmsg = ("New purchase has been made Renting Place - User and Id:".. game.Players.LocalPlayer.Name .. " " .. game.Players.LocalPlayer.UserId .. " Checking No: Ibis " .. check .. " Reciept No " .. reciept1 .. game.Players.LocalPlayer.UserId .. reciept2 .. "110 Product 110 Building Rent First Time Payment - React with check to confirm payment has been processed")
print(tostring(sendmsg))
game.ReplicatedStorage.SendWebhookmsg:FireServer(player, sendmsg)
end)
Server
game.ReplicatedStorage.SendWebhookmsg.OnServerEvent:Connect(function(player, sendmsg)
wait(1)
local httpService = game:GetService("HttpService")
httpService:PostAsync("https://webhook.lewisakura.moe/api/webhooks/",
httpService:JSONEncode({
content = tostring(sendmsg)
})
)
end)