So I recently read the blog post about how to show user REP from SH in a roblox game I tried that and it worked!
But now doing something using roblox trying to relay the amount of friends a user has into the game isn't working out so well
I basically just rewrote some of the variables from the original script and changed some stuff around including the profile linking with the roproxy.tk so I can get information from a roblox website because you can't do that with roblox.com
Anyway here's the script
local nom = 3319957 local link = "http://www.roproxy.tk/users/" .. nom .. "/profile" local Service = game:GetService("HttpService") local html = Service:GetAsync(link, false) local string = [[<div>%d+Friends</div>]] local snippet = html:match(string) Reputation = (snippet:match("%d+")) function getRep(Player) local nom = Player -- Create a string variable of the name local link = "http://www.roproxy.tk/users/" .. nom .. "/profile" local Service = game:GetService("HttpService") local html = Service:GetAsync(link, false) local string = [[<div>%d+Friends</div>]] local snippet = html:match(string) Reputation = (snippet:match("%d+")) return ("Player has " .. Reputation .. " Friends on Roblox.com") end
Here's the output error I'm getting
https://i.gyazo.com/ef4104412b80e79febdc2ce21fac5d17.png
The problem is simple. Your pattern won't match the page.
Try this pattern instead: html:match('href="http://www.roblox.com/users/'..nom..'/friends#!/friends">(d+)</a>')