What do you want to achieve? Keep it simple and clear!
Getting a string from a website
What is the issue? Include screenshots / videos if possible!
I cant find any way to do it.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
local HttpService = game:GetService("HttpService")
local response = HttpService:GetAsync("example.com")
local data = HttpService:JSONDecode(response)
print(data.StatusCode)
i tried this but then i realised this dosent work i get this error:
The current identity (2) cannot HttpEnabled (lacking permission 3)
but then i realised this wont work i am not sure what i can do
Scripts and LocalScripts cannot set the HttpEnabled property, you will either have to enable it through the game settings or run game:GetService("HttpService").HttpEnabled = true inside the command bar when the simulation is not running.
Remove it from the Script and run it in the command bar. The reason the error occurs is because that script attempts to run that line and it doesn’t have permission to set HttpEnabled(that line must be removed from your script).
It does, but in this case the original poster had not allowed for Http requests to be made from his game in the security tab of his game’s settings window.