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

Is this the right code for Game leaderboards?

Asked by
Seyfert 90
7 years ago
Edited 7 years ago

Please note I am referring to the leaderboards page that can be seen as games. It has a "Players" and "Clans" section. I have this code in PlayerAdded and I see the message appear saying I got the points, but when I check my place it says "No Players Found"...do I need to save this?


local PointsService = game:GetService("PointsService") local universeBalance = PointsService:GetGamePointBalance(player.userId) PointsService:AwardPoints(player.userId, 1)
0
Heya,I'm unable to open studio right now.As soon as I can I will help you with this issue. Reshiram110 147 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

If you are referring to the leaderboard that scripters make to show on the player list then you would need to use IntValues. You could also make a section that shows the "Points" awarded to the player. It could look something like this.


game.Players.PlayerAdded:connect(function(plr) local folder = Instance.new("Folder") -- Puts the leaderstats in a secure place so that it is harder to hack folder.Name = "leaderstats" -- Has to be called this for the script to know you are trying to make a leaderboard folder.Parent = plr local KO = Instance.new("IntValue") --Creates a value to hold what you want KO.Name = "Kills" -- Names the value KO.Parent = folder --Puts the parent in the folder local point = Instance.new("IntValue") point.Name = "Points" point.Parent = folder --[[If you want to update the "Points" then you can do]] point.Changed:connect(function() --Put what you want in here to show end) end)
Ad

Answer this question