Hello,
I was trying to make an AI that using an Rest API.
I even tried changing http to https…
Like it dont want to work.
Here the script:
-- Main Script
local httpService = game:GetService("HttpService")
------------------------------------------------ This is a typeWriter Effect dont mind that
local function typeWriterEffect(object, text)
for i = 1,#text,1 do
object.Text = string.sub(text,1,i)
wait(0.05)
end
end
-------------------------------------------------
script.Parent.Parent.Parent.button.MouseButton1Click:Connect(function()
local data = httpService:GetAsync("https://random-rest-api-that-i-use.lol/api/apikey&msg=".. script.Parent.Text) -- URL is similar to original URL
data = httpService:JSONDecode(data)
local aa = data.cnt
typeWriterEffect(script.Parent.Parent.Parent.mainFrame.Answer, aa)
end)
Script is under of a TextBox.
