How do I use HTTP services to my advantage to track a number for example a moving number on Team trees If you can help me can you please comment.
There is this API endpoint by someone you can use: Team Trees API: track #teamtrees project status | RapidAPI
Alternatively, you can use :match
to get the current tree count. I suggest doing this because IMO its just easier.
Here is a pattern that works for me:
local HttpService = game:GetService("HttpService")
local Response = HttpService:GetAsync("https://teamtrees.org/")
local Trees = Response:match([[<div id="totalTrees" class="counter" data%-count="(%d+)]])
print(Trees)
2 Likes
Ok I thought I had to do something with that thanks for showing me.