Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What's the "p.userId" I.D for ANYONE in a game?

I'm working on a Player Point Script, and I'm having a bit of issues, and I want to make Questions about them separately.

Here's where I think the issue is:

(NOTICE THIS IS NOT IN FRAME 1)

game:GetService("PointsService"):AwardPoints(p.userId,10) 

What is the number for the script "(p.userId,10)" for ANYONE that gets the Points? Is it 10 or is it a other number?

1 answer

✓ Accepted answer

p.userId is the userId of a player object p.

:AwardPoints requires the user id of some particular player.

If player p is the one you want to award points to, this is a potential way of writing this.


If player p isn't the player you want to award points to, then use the player that you do want to award points to.

This discussion is preserved as it was. New answers, comments, and votes are closed.