why is this not working? i have no idea how to fix please help.
here is script:
local remF = script.Parent.ram
local Name = game.Name
local https = pcall(function()
game:GetService('HttpService'):GetAsync('https://www.google.com/')
end)
local success, failed = pcall(remF:InvokeClient(Name, https))
if success == true then
print('Worked')
end
if failed == true then
error('Error: Failed To Send')
end
the error is coming from Line 9

10 comments
the player thing works thanks but the Name and http when it goes to the localscript i wanted to get teleported to one of my other games to give that data too but it always comes up with nil when its printed. do you know a fix?
Since you are using "RemoteFunctions" I just want to make sure that in your LocalScript when you say "remF = function()" to make sure that the first two parameters are actually there such as "remF = function(name, https)" but also make sure that you aren't including "Player" within it. The "Player" is only for invoking and never gets sent to the actual LocalScript function.
yh dw i didnt put in Player with Name, http even so i still get nil when sent to the other game
Make sure "HTTPService" is enabled in your other game. I'm quite unsure why it would return nil for game.Name; maybe you could do wait() as it might not have loaded in yet.
its still saying nil, maybe its something to do with my other game?
idk if this will work but its the same script but i changed it abit, i added local plr = game.Players:FindFirstChildOfClass("Player") and with remF:InvokeClient(plr, https)
So it seems that either you are incidentally trying to find multiple instances of "Player" or you're trying to send the request to all the players. If you're trying to send a request to all the players I reccomend using "RemoteEvents" and then using "FireAllClients()" but it would be easier if you just use ".OnPlayerAdded:Connect(Plr)" and use that instead.
I also don't reccomend using "RemoteFunctions" on the server side because the script could pause and wait indefinitely until it gets a value from the client (and could possibly yield forever).
then could i use coroutine.create() then do coroutine.resume? or coroutine.yield?
When you use something like ".OnPlayerAdded" it would run on a per-player basis so there wouldn't need to be any worries about coroutines.