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

What is a script line (DESP)?

Asked by
Hybric 271 Moderation Voter
10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

What is the script line when you want to put like "if the player has a badge then"

I highly appreciate it if you answer.

1 answer

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

The method you are looking for is UserHasBadge which is part of the BadgeService.

It has two parameters, a user-id and a badge id.

If player is a Player object, then their user id is player.userId.

It returns a boolean, true if the user owns the asset, and false if they do not.

Ad

Answer this question