Getting scripts from Github problem

hello there, so i discovered that you can get code from github repositories, but idrk how to execute them, when i try doing it it just errors

i get the script like this:

local code = http:GetAsync("https://github.com/repository/blob/main/script.lua", true)
local func = loadstring(code)
func()

when i execute func() it just errors saying that im calling a nil value (since when i loadstring the “code” it just returns nil)
so the actual question is
the code variable should return the code itself or it returns something else? bc when i print it it doesnt seems to be the actual script.

if anyone could help me with this.

thanks!

you need to request the raw version and your url is wrong

1 Like

to request the raw version i need to copy the link to it right? im kinda new to this

click on the raw button then copy the url

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.