I am trying to get a userid from a username in a roblox endpoint using HTTP requests, yes HTTP Requests are turned on, yes I specified Enum.HttpContentType
Here is the script:
local HTTP = game:GetService("HttpService")
script.Parent.MouseButton1Click:Connect(function()
local User = script.Parent.Parent.Username.Text
local Response1 = HTTP:JSONDecode(
HTTP:GetAsync("https://api.roblox.com/users/get-by-username?username="..User, Enum.HttpContentType.ApplicationJson)
)
local UserID = Response1.Id
print("Got User ID of "..game.Players.LocalPlayer.Name)
local GetUserFollowers = HTTP:JSONDecode(
HTTP:GetAsync("https://friends.roblox.com/v1/users/"..UserID.."/followings/count", Enum.HttpContentType.ApplicationJson)
)
local FollowerCount = GetUserFollowers.count
print("Getting follower count of "..User)
script.Parent.Parent.Output.Followers.Text = ("Follower Count: "..FollowerCount)
end)

4 comments
My indents are correct on my script. Indents are bad on this post though lol
What line does the error happen on? Don't see any places where this error could crop up off the bat.
Line 8
Did you ever get the answer to this question or figure it out?