Find the original tutorial on how to make a webhook with cloudflare here
- Create a Webhook on discord.
- Go to
Cloudflare > Workers > Createa Worker and create a worker. Make sure the worker supportsURLandURLSearchParams - Go to
cloudflare.jsand paste into the code editor - Replace
yourwebhookurlwith the Discord Webhook you created. - Press Deploy and let it deploy
- Go into roblox studio and paste in the
playerJoined.luacode - Enable Http Requests in
Game Settings > Security - Replace
yourworkerurlwith the worker url of the worker you created. Example url:https://your-dyno-url.workers.dev/ - Now publish your place and join the game. It should now display a player joined message if you have done this correctly.
To use the cloudflare-expanded you can request the urls with the perfix ?webhookId like this
https://your-dyno-url.workers.dev/?webhookId=webhook1
https://your-dyno-url.workers.dev/?webhookId=webhook2
You can now edit the script in roblox studio to have mutliple webhooks, You can set up admin logs or anything that needs to be logged with this.