Boolean ".HasVerifiedBadge" - best way to check the players with verified badge (Tutorial)

Hello, Im Fasola16 and I writting here to teach you what is “.HasVerifiedBadge” and how and when to use it.

What is .HasVerifiedBadge?

“.HasVerifiedBadge” its a boolean, that determine if player has a verified badge or no.

INFO

If you dont know what is verified badge, its a visual indicator, that show, the account is both notable and authentic. More info in here.

When to use .HasVerifiedBadge?

You can use this function for ex. Giving a special reward only for a verified players or count how many verifed players joined the game.

How to use .HasVerifiedBadge in scripts?

lets make a script that will check if player has verified badge or no.

using this code in scripts its simple. On first, You need to use “.Player.Added” function. The script must check the player, if has been added before checking the verified badge. And then set the parameter name.

ex.:

local player = game.Players

player.PlayerAdded:Connect(function(plr)

end)

then use “if” function, that script could able to check. then put “plr.HasVerifiedBadge == true then”
that script will know what to check and will see if its true. then use “print()” and type a your text here to know if this script work or no.

local player = game.Players

player.PlayerAdded:Connect(function(plr)
	if plr.HasVerifiedBadge == true then
		print("player has verified badge")
	end
end)

the script is ready, but what we want is the script check if player has a VerifiedBadge or no. so only we need its to add function “else” and add another “print()” that the script will say, if player doesnt have a verified badge.

local player = game.Players

player.PlayerAdded:Connect(function(plr)
	if plr.HasVerifiedBadge == true then
		print("player has verified badge")
    else
        print("player hasn't verified badge")
	end
end)

and now this script will check and tell us, if player has a verified badge or no. Unfortunately this boolean rarely get “true” result, but almost always get “false” result.

INFO

This boolean will rarely get “true” result, because the players with verified badge rarely comes to the specific experience.

Summary:

  • “HasVerifiedBadge” its a boolean that checks if player has a verified badge
  • It can be used for ex: giving a special reward only for a player with verified badge
  • This function will rarely get “true” result, but almost always get “false” result.

That is all from now! If you have more question, ask in comments :wink:

2 Likes

sorry if in “When to use .HasVerifiedBadge?” has only one example. if you have some ideas about it give it here.

A great way to implement this into a hangout game would be to make a VIP lounge that could only be accessed if the player is verified. :grinning:

1 Like

Errmmm, actually its a boolean, not a function :nerd_face:

5 Likes

Maybe they’re referring to the __index function that gets called when you try to read from it? You never know.

2 Likes

It might be the case :thinking:

1 Like

What is this even supposed to mean then?

1 Like

No idea, honestly.
It definitely isn’t a function, as it would need to be called (eg. player.HasVerifiedBadge()), but rather a boolean value, as stated in the Roblox documentation:

2 Likes

Why’s there a community tutorial for this? (I swear I’m confused)

5 Likes

People like to make tutorials teaching how you can read one property and use that in an if-statement

2 Likes

dont worry everyone, i have chenged “function” to “boolean”. thanks for remind

1 Like

Am I rude when I say that this is completely useless?

9 Likes

well, you can also count how many verifed joined the game

What? I’m saying that the tutorial is useless. There is nothing special about this property, it’s like using any other property.

1 Like

well, with is code, you can count how many verified members played this game. if more verified players then maybe more players will come.

Again, what does that have to do with anything?

4 Likes

if some people want the code to make something nice to verified members or count them how many was in this game for getting more popular.

Okay can you also please make a tutorial on how I print a player’s username when they join the game?

3 Likes

I dunno how I didn’t get a notification for this, but uh. Well. Uh. You see. Er. “function” in that phrase is actually a completely different and unrelated clause, as separated by the comma. .HasVerifiedBadge is a indeed boolean when evaluated, but evaluating it requires a function call :nerd_face:

2 Likes

because __index function of the userdata

3 Likes