HttpService is not allowed to access ROBLOX resources when not going to

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Fix the HttpService is not allowed to access ROBLOX resources.

  2. What is the issue? Its saying HttpService is not allowed to access ROBLOX resources but I am not

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? Developer Hub and youtube but they did not help.

Also I am using the PNG Library by CloneTrooper1019.

Draw localscript:

local Draw = require(game:GetService("ReplicatedStorage"):WaitForChild("playLib"):WaitForChild("Draw"))


Draw.DrawImage("https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/SNice.svg/800px-SNice.svg.png")

Draw module:

--IAmBanFor June 7 2022

local module = {}

local PNG = require(script.Parent:WaitForChild("PNG"))

function module:DrawImage(url)
	--nerdy stuff
	local UrlData = game:GetService("ReplicatedStorage").GetRawData:InvokeServer(url)
	
	
	
	local buffer =  PNG.new(UrlData)
	
	if buffer then
		print(buffer.Bitmap)
	else
		error("PlayLib Error | Buffer is not correct")
	end
end

return module

stuff script:

game:GetService("ReplicatedStorage"):WaitForChild("GetRawData").OnServerInvoke = function(url)
	return game:GetService("HttpService"):GetAsync(url)
end
1 Like

Wheh using InvokeServer,

The first argument on the server side is always the player. Try to add a player reference as the first argument. Like this:

...=function(player,url)
1 Like

Nope:

local UrlData = game:GetService("ReplicatedStorage").GetRawData:InvokeServer(game.Players.LocalPlayer,url)
game:GetService("ReplicatedStorage"):WaitForChild("GetRawData").OnServerInvoke = function(player,url)

return game:GetService("HttpService"):GetAsync(url)

end

Have you enabled http access? In the settings?

Yes:

Also I heard using proxy but theres a Gameboy Emulator that uses the same thing that I did.

Where do you get that error at?
In which script?
Is it in the ‘stuff’ one, right?

In the InvokeServer function, you do not have to pass LocalPlayer yourself (roblox passes it for you)

Did you read the reply?:

(30 limt :frowning: )

No, notice it’s on the server side.
On the server side you always need to provide the player as first argument( when working with InvokeServer or FireServer)

Here you are passing LocalPlayer, roblox does that for you
(Remove game.Players.LocalPlayer)

Maybe of these could help:

https://www.google.com/url?sa=t&source=web&rct=j&url=https://devforum.roblox.com/t/httpservice-is-not-allowed-to-access-roblox-resources-when-not-attempting-to/332167&ved=2ahUKEwj_15jI1pz4AhUChf0HHUhlDJ4QFnoECAUQAQ&usg=AOvVaw108K34TyhER_IfSyLX4_FN

https://www.google.com/url?sa=t&source=web&rct=j&url=https://devforum.roblox.com/t/httpservice-is-not-allowed-to-access-roblox-resources/1137544&ved=2ahUKEwj_15jI1pz4AhUChf0HHUhlDJ4QFnoECAYQAQ&usg=AOvVaw1xXygsta02r3RAts9AsvyC

https://www.google.com/url?sa=t&source=web&rct=j&url=https://devforum.roblox.com/t/getting-httpservice-cant-access-roblox-resources-when-trying-to-use-a-webhook/567114&ved=2ahUKEwj_15jI1pz4AhUChf0HHUhlDJ4QFnoECAcQAQ&usg=AOvVaw3DLrVMJLFfDbwVFUuW0ZgQ

https://www.google.com/url?sa=t&source=web&rct=j&url=https://devforum.roblox.com/t/http-service-error/1185643&ved=2ahUKEwj_15jI1pz4AhUChf0HHUhlDJ4QFnoECB0QAQ&usg=AOvVaw1ZfI0FXWiLvh7UP9mkSNVt

I read those but the problem is that they are not GetAsync.

Then I get Argument 1 missing or nil

Replace Draw.DrawImage with Draw:DrawImage

Thank you for this! I did not even know that.

The method is defined with a colon operator which usually indicates that it expects to be called with a colon operator too.