Need help on this script:

You can write your topic however you want, but you need to answer these questions:

  1. I want to make a script where on the leaderboards, it shows the players place visits.

  2. My issue is, I don’t know how to get reference to place visits. image

  3. I’ve looked for Youtube Videos, DevForums, Developer Hub, and I have found nothing.

Note: I am new to scripting. Thanks!

1 Like

Your most likely gonna need to program this outside of ROBLOX because I don’t think roblox has its own system

Oh, because I saw this in Flex Your Account Age. Sorry!

And what outside program would I even use?

Umm if you know java most likely since it has to do with websites

It’s quite a complex system. It probably isn’t possible to exclusively do this in the studio. Unless you’re pretty experienced with scripting, despicably in websites, than I’d recommend relying on other’s code for this.

Place visits is the amount of times that the player has joined the game, so in order to make your own place visit number for a player you need to run this code in a normal script:

   game.Players.PlayerAdded:Connect(function(plr)
       plr.PlaceVisits.Value = plr.PlaceVisits.Value + 1
   end)

You would need to save this value with data stores and I haven’t made the leaderstat named “PlaceVisits” in the code so you would also need to make that on your own. I hope this helps!

EDIT: I had a little misunderstanding with what you were asking for and gave the amount of times the player joined YOUR game not how many times other players joined their games. So sorry for this!

3 Likes

Thanks you so much! This helped me out SO much!

Do you want to see how many times a player visited your game OR do you want to see how many place visits a player has?

How many they have, please. As that’s what I need.

https://devforum.roblox.com/t/place-visits-help/622276/2?u=takticiadam
rogchamp explains it all. You will need a proxy service because Roblox does not want you to use their API in their own game somehow.

2 Likes