Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to get YouTube sub count onto a Roblox game?

1 answer

✓ Accepted answer

You can easily do that using youtube's api and roblox's HttpService

Here's an example:

local HS = game:GetService"HttpService"
local ApiKey = "your youtube api key here"

while wait(2) do
	local resp = HS:GetAsync("https://www.googleapis.com/youtube/v3/channels?part=statistics&id=UC-lHJZR3Gqxm24_Vd_AJ5Yw&key=" .. ApiKey, true)
	resp = HS:JSONDecode(resp)

	textlabel.Text = resp.items[1].statistics.subscriberCount
end

here's an example response

4 comments

0

Awesome thx didnt know u could do that, ill try this

0

I put in my apikey on line 2 but on line 5 do you know how I would change that to another youtubers channel?

0

change the channel id after the &id= part

0

got it thx

This discussion is preserved as it was. New answers, comments, and votes are closed.