How can I generate a random word? I was thinking of doing a 'post request' from http://watchout4snakes.com/wo4snakes/Random/RandomWord but im not sure how to.
nvm, This works:
local HttpService = game:GetService("HttpService") local function randomword() local response = HttpService:RequestAsync( { Url = "http://watchout4snakes.com/wo4snakes/Random/RandomWord", -- This website helps debug HTTP requests Method = "POST", Headers = { ["Content-Type"] = "application/json" }, Body = HttpService:JSONEncode({hello = "world"}) } ) -- Inspect the response table if response.Success then return(response.Body) else print("The request failed:", response.StatusCode, response.StatusMessage) end end local success, message = pcall(randomword) if not success then print("Http Request failed:", message) end print(randomword())