Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Http 404 error? Placeholder

First off all, CHECK YOUR SCRIPT BEFORE POSTING IT! Questions have a very short life span, And i have to repost it again. This website is for helping people!!!! Second, I want you to fix this problem.

It says: HTTP 400 (Bad Request)

local WHU = "Insert discord joke here"
local httpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local Plr = Players.LocalPlayer
local replicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = replicatedStorage:WaitForChild("Send")

function Click()
	local InfoValue = script.Parent.Parent.InfoValue.Value
	if InfoValue == false then
	    data = {
	        ['content'] = "Player "..Plr.Name.." has sended something!",
			['embeds'] = {{	
				['title'] = Plr.Name,
				['description'] = script.Parent.Parent.Message1.Text,
				['color'] = script.Parent.Parent.Color.Text,
				['url'] = "https://web.roblox.com/users/"..Plr.UserId.."/profile",
				["footer"] =  {
	        		["text"] = Plr.UserId,
	      	 	    ["icon_url"] = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..Plr.Name,
	     	    },
			}},
	        }
    elseif InfoValue == true then
		  data = {
	        ['content'] = "Player "..Plr.Name.." has sended something!",
			['embeds'] = {
			{
				['title'] = Plr.Name,
				['description'] = script.Parent.Parent.Message1.Text,
				['color'] = script.Parent.Parent.Color.Text,
				['url'] = "https://web.roblox.com/users/"..Plr.UserId.."/profile",
				["footer"] =  {
	        		["text"] = Plr.UserId,
	      	 	    ["icon_url"] = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..Plr.Name,
	     	    },
			},
			{
				['title'] = script.Parent.Parent.Message2.Text,
				['description'] = script.Parent.Parent.Message1.Text,
				['url'] = "https://web.roblox.com/users/"..Plr.UserId.."/profile",
				["footer"] =  {
		        	["text"] = script.Parent.Parent.FooterIcon.Text,
		      	 	["icon_url"] = script.Parent.Parent.FooterIcon.Text,
		     	},
			},
			},
		   }
	end
    local finalData = httpService:JSONEncode(data)
    remoteEvent:FireServer(WHU, finalData)
end

script.Parent.MouseButton1Click:Connect(Click)


--[[
{
  "content": "Player hasanchik sended something!",
  "embeds": [
    {
      "title": "Hasanchik",
      "description": "sddsfsdfsdfsdfsdf",
      "url": "sddfsfsd",
      "color": 2031871,
      "footer": {
        "text": "dsdfsfdsdfdsfdfdsdfsdfsdf",
        "icon_url": "https://tr.rbxcdn.com/5dccb86ea2be3852007a91c56f5dc00b/100/100/Avatar/Png"
      }
    },
    {
      "title": "Check out my merch!",
      "description": "asdasdasdasdasdadad",
      "url": "a",
      "footer": {
        "text": "https://tr.rbxcdn.com/5dccb86ea2be3852007a91c56f5dc00b/100/100/Avatar/Png",
        "icon_url": "https://tr.rbxcdn.com/5dccb86ea2be3852007a91c56f5dc00b/100/100/Avatar/Png"
      }
    }
  ]
}

-- 				['url'] = "https://web.roblox.com/users/"..Plr.UserId.."/profile",
--				['icon_url'] = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..Plr.Name
--]]

1 answer

Make sure you have http requests on for your game otherwise it won't work

1 comment

0

Yes. I already have it on.

This discussion is preserved as it was. New answers, comments, and votes are closed.