As of currently, I cannot figure how to fix the HTTP 404 (Not Found) Error. Here is part of my script that is erroring.
local Text, Color = Remote:InvokeServer("SendData", Chose) -- Sends the data
As of currently, I cannot figure how to fix the HTTP 404 (Not Found) Error. Here is part of my script that is erroring.
local Text, Color = Remote:InvokeServer("SendData", Chose) -- Sends the data
Can we see the definition of the function being invoked?
Please send the entire script so we can find out where the issue is.
Considering “SendData” is just a literal string value that should be being sent fine, check the variable “Chose” make sure it’s sending a valid value to the server.
Sorry, but this tells us nothing. Please include what Remote
's OnServerInvoke
is.
local ScreenGui = game:GetService(“StarterGui”) – Screen Gui
local ReplicatedStorage = game:GetService(“ReplicatedStorage”) – Replicated
–[[ LOCALS ]]–
local Main = script.Parent:WaitForChild(“Main”) – Main Frame
local Title = script.Parent:WaitForChild(“Title”) – Title Text
local Templates = script:WaitForChild(“Templates”) – Templates
local Home = Templates:WaitForChild(“Home”) – Home Page
local Completed = Templates:WaitForChild(“Completed”) – Completed Page
local Option = Templates:WaitForChild(“Option”) – Option Page
local QuestionTemplate = Templates:WaitForChild(“Question”) – Question Template
local Remote = ReplicatedStorage:WaitForChild(“RemoteFunction”) – Remote Function
local Data = {} – Data Table (holds all data)
local Answered = {} – Answered Table (holds all answers)
local CurrentQuestion = 0 – Current Question should be 0.
local Wrong = 0 – Current Wrong answers should be 0.
Data = Remote:InvokeServer(“GetData”) – Getting the data.
wait() – Waiting
–[[ FUNCTION INIT ]]–
local function Init()
local suc, err = pcall(function() – Pcall Function
ScreenGui:SetCore(“ResetButtonCallback”, false) – Resetting false
ScreenGui:SetCore(“TopbarEnabled”, false) – Topbar false
ScreenGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false) – Coregui false
end)
if err then
wait(.5)
return Init()
end
end
Init() – Basically the function for when player is In the Gui so “in it”.
–[[ FUNCTION NEXT ]]–
function Next(Current, Chose) – Next question function
Current:TweenPosition(UDim2.new(1, 0, 0, 0), ‘Out’, ‘Linear’, .5) – Tween
if Chose then – When they chose
local Text, Color = Remote:InvokeServer(“SendData”, Chose) – Sends the data
if not Color then – If not a color then
if Text == “Wrong” then – If the text was Wrong then
Wrong = Wrong + 1 – Add a point to it
local AWrong = script.Parent.Wrong.Holder[tostring(Wrong)] -- New Wrong
AWrong.Wrong1.ImageColor3 = Color3.fromRGB(255, 99, 101) -- Turning Image Red
AWrong.Wrong2.ImageColor3 = Color3.fromRGB(255, 99, 101) -- Turning Image Red
end
local Moved; -- New Local Variable
for i,v in pairs (Main:GetChildren()) do
if v.LayoutOrder == CurrentQuestion + 1 then -- Layout Order is the current question
v:TweenPosition(UDim2.new(0, 0, 0, 0), 'Out', 'Linear', .5) -- Tweening
Moved = v
end
end
if Moved then -- If moved then
CurrentQuestion = Moved.LayoutOrder -- Current question is set to the moved layout order.
end
elseif Color then -- If their is color
Completed.Parent = Main -- Setting parent to Main
Completed:TweenPosition(UDim2.new(0, 0, 0, 0), 'Out', 'Linear', .5) -- Tween
if Text and Color then -- If Text and Color then
Completed.Results.Text = "Results: "..Text -- Results are shown here
Completed.Results.TextColor3 = Color -- Results text color is here
end
end
else -- If nothing meets requirements then (same thing as above)
local Moved;
for i,v in pairs (Main:GetChildren()) do
if v.LayoutOrder == CurrentQuestion + 1 then
v:TweenPosition(UDim2.new(0, 0, 0, 0), 'Out', 'Linear', .5)
Moved = v
end
end
if Moved then
CurrentQuestion = Moved.LayoutOrder
end
end
end
–[[ DATA TEXT ]]–
Title.Text = Data.Title – Setting the title to the configuration title
if Data.Image then – If their is a image then set the image
Home.Logo.Image = Data.Image – setting here
else
Home.Logo.Visible = false – If their isn’t a image then set it to false
end
Home.Parent = Main – Home parent is Main
–[[ HOME NEXT FUNCTION ]]–
Home.Start.MouseButton1Click:Connect(function() – When they click start
Next(Home) – Next function
end)
–[[ DATA QUESTIONS ]]–
for i = 1, #Data.Questions do – Checking all data questions
local Question = Data.Questions[i] – Creating a local variable for one question
local Clone = QuestionTemplate:Clone() – Cloning the Question template
local Chose, OChose = nil, nil – New local variables
Clone.Question.Text = Question.Question -- Setting Clone text to question text
Clone.LayoutOrder = i -- Setting clone layoutorder
Clone.Parent = Main -- Setting clone to its parent
for v = 1, #Question.Options do -- Checking all Questions options
local COption = Question.Options[v] -- Making the Chose option
local OClone = Option:Clone() -- Making other options
OClone.LayoutOrder = v -- Setting other clone layout order
OClone.Parent = Clone.Options -- Setting other clone parent
OClone.TextLabel.Text = COption -- Setting other clones text
OClone.MouseButton1Click:Connect(function() -- When they click an option
Chose = COption -- Set Chose
if OChose then -- If chosen then
OChose.ImageColor3 = OClone.BackgroundColor3 -- Set Color
OChose.TextLabel.TextColor3 = OClone.TextLabel.TextColor3 -- Set Color
end
OClone.ImageColor3 = script.Parent.Parent.BackgroundColor3 -- Set Color
OClone.TextLabel.TextColor3 = Color3.fromRGB(167, 255, 161) -- Set PICKED Color
OChose = OClone -- Setting chose to clone
end)
end
Clone.Next.MouseButton1Click:Connect(function() -- If they hit next
if Chose then -- If they chose after hitting next
Answered[i] = Chose -- Answered is the chosen one
Next(Clone, Chose) -- Next function but with chose
end
end)
end
*