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

Why am i getting the error "Unable to cast value to Object"?

dont know how to fix and i dont know what it means please help me this is taking way too long for me.

script:

local plr = game.Players:FindFirstChildOfClass("Player")
local rem = script.Event

local https = pcall(function()
    game:GetService('HttpService'):GetAsync('https://www.google.com/')
end)

print('Fireing To Client.')
rem:FireClient(tostring(https))

2 comments

0

What line does it say this is happening on?

0

line 9

1 answer

Getting the returned packs as JSON encoded string.

local serv = game:GetService('HttpService')
local success,returned = pcall(function()
    return serv:JSONEncode(serv:GetAsync('https://www.google.com/'))
end)
print(returned)

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