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

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

Asked by 9 years ago

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

Log in to vote
1
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

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.

Ad

Answer this question