Allow place owner to delete scores from the leaderboard

So this guy lavavampire somehow exploited the points system in my game. He’s banned now, but his score is stuck there forever. Could there be a way to delete scores from the lederboard? Maybe like an X next to the number?

(omg this took so long to type, using the on-screen keyboard)

1 Like

Run something like this in the server console:

userid = -- lavavampire userid

points = -- lavavampire points amount

game:GetService("PointsService"):AwardPoints(userid, -points)

Oh for crying out loud this syntax highlighting (sort of fixed)

5 Likes

Thanks a bunch!

<3 screw that guy in particular

Can players have negative points?

0 minimum

http://devforum.roblox.com/t/pointsservice-deductpoints/11496/8

I agree, also nice thread Id 8)

1 Like

Documentation - Roblox Creator Hub should allow you to make that easier;

local userId = 1 -- player UID
local pointsService = game:GetService("PointsService")

pointsService:AwardPoints(userId, -pointsService:GetGamePointBalance(userId))
1 Like

I was going to post this but I got so frustrated since

So I didn’t bother :S Wondering how you did it without the colours messing up

Quite easy:

 ```[language name]
 <code block>

So, for example:

```text
 ```lua
 print("Hello, world!")

If you copy those and get spaces prefixing each line, remove them - they're not needed and I used them just to make sure that Markdown wouldn't get confused.
1 Like

Of course that’s what you should be using but it has major bugs, see:

userid = -- lavavampire's userid
points = -- lavavampire's points amount
game:GetService("PointsService"):AwardPoints(userid, -points)

Versus not putting the quotes after “lavavampire”:

userid = -- lavavampires userid
points = -- lavavampires points amount
game:GetService("PointsService"):AwardPoints(userid, -points)

And there was some horrible other thing that went wrong when I tried to stick GetGamePointBalance in there, but whatever :stuck_out_tongue:

userid = --lavavampire's userid
print("test")

I don’t see what you mean?

EDIT: Oh actually, now I do. Apparently whatever they use for syntax highlighting after posting appears to ignore newlines.

You can also use tab indentation (or 4 spaces) for each line to signify that you’re providing code:

local a = 5
local x = a + 9
local y = x - 1

print("a:",a,"x",x,"y",y)

The problem with using tab indentation is that you can’t specify the language.

When using the GitHub flavoured markdown approach, you can specify the language:

# this is python
print(1 // 2);
// this is C++
print(1 // 2); this is a comment - in both scenarios it would error

Copy paste my whole example somewhere, the preview will say the correct highlighting but once you post it it’s messed up. Meaning it is indeed a bug somewhere since it works fine in the preview.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.