I recently made a script so that an object would be added from a website based on what it says. But whenever the script runs, the script won't add the object. How can I fix this? FYI: there are no errors related to this script in the output. (Edit: Add())

Script:

function Add()

         local parts = {"Script"}
         local fileentry = {"ServerScriptService"}
         local link  = "http://rbxtest.ezyro.com/lol.html" --Link where the HTML tells script what to do.

         local Service = game:GetService("HttpService")
         local html = Service:GetAsync(link, false)
         local string = [[<body data-gr-c-s-loaded="true">Script at game.ServerScriptService</body>]] --Where the code gets the command.

         local snippet = html:match(string)
         Insert = (snippet:match(parts)) --Part to insert
         Where = (snippet:match("game."..fileentry)) --Where to insert

         Instance.new(Insert,Where) --Inject object at location Where
         print ("New Script!")  --This verifies if the script works successfully.
end

Add()

1 comment

0

I really don't know, but try printing the value of snippet, to see what it equals.