Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

how would i even go about makng a live visit counter? [closed]

Asked by 4 years ago

would i need to use the place id? how would i ffind the visits? how would i make it update?

an someone help me i've never done that before..

Closed as Not Constructive by Leamir

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
-1
Answered by
SpiralRBX 224 Moderation Voter
4 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.
--settings
local updateTime = 3
local placeId = 2473334918

--constants
local link = "https://www.rprxy.xyz/games/"

--shortcuts
local Functions = game.ReplicatedStorage.Functions
local http = game:GetService("HttpService")

--functions
local NumberWithCommas = require(Functions.NumberWithCommas)


--update function
local function update()
    local web = http:GetAsync(link .. placeId)
    local start,last = web:find("Visits")

    repeat
        last = last + 1
    until tonumber(web:sub(last,last)) ~= nil or last > web:len()
    local mem = last
    repeat
        last = last + 1
    until web:sub(last,last) == ">" or last > web:len()

    local count = web:sub(mem,last-1)
    script.Parent.SurfaceGui.Count.Text = count
end
while true do
    update()
    wait(updateTime)
end

replace the PlaceID and UpdateTime

script taken from here: Click Me!

0
If you're going to answer with a stolen script, you should at least explain how it works. SteamG00B 1633 — 4y
Ad