So I am creating a cool script and I want others to use it, this is my code
local web = 'raw pastebin url local http = game:GetService('HttpService') local code = http:GetAsync(web, true) loadstring(code)
BUT, the first line of the script is print the word "test", and it doesn't do anything, and the script with local web = 'raw pastebin url' is a Script, while the script from the url is a LocalScript, why won't it work?
Also saying
print(loadstring(code))
at the end just prints function: 4B580618
BUT, saying print(code) will print all the code, now how do I load all that, how do I load the variable code as a LocalScript
Finally, I just want it load the script, because soon once I upload my website, I want it to grab the code from the website, the website destination to the script will prob be like www.example.com/scripts/testScript.lua
The loadstring
function returns a function that you have to call.
loadstring(code)()
This will call loadstring which will return the function and the returned function is called