Help with a script

hello i have a problem with this script :

I make a [VIP] name tag above the head and I want when people buy the VIP pass, the name tag will work, or (me who has the pass) the tag does not appear. so i am wondering if line 9 there is not a problem?
and why is the parenthesis underlined?

thanks in advance for answers !!

1 Like

You need to add an end to your “if game.MarketplaceService…” scope. And this script wouldn’t do what you want it to do anyway.

  1. You need to make it so people who own the gamepass will have the nametag (right now you only have it work for two people)
  2. You need to add it to the character upon the .CharacterAdded event, not the .PlayerAdded one.
2 Likes

Right now assuming you realized you forgot the end in the “if” statement, if the player is named “RingOfSaturn59”, then it will give your nametag. Same with second if statement. Is this what your trying to accomplish?

1 Like

Hello!

Have you tried adding another “end” at the one of the last lines? I think that might fix the red underline at the paranthesis which is in the 16th line.

1 Like

For the person to understand, Rings, press spacebar where the black round thinggy is and put another “end” so there should be 3 end’s

2 Likes

i added the 3rd ‘end’ but it till don’t work

Send another screenshot of the script you were working on.

i just changed PlayerAdded to CharacterAdded and the ‘end’ at the end

*i was follow a tuto on yt for make this name tag

and you tried it with “PlayerAdded”, with the third ‘end’?

yes its not appear

image

Okay, to make sure.
You have, Game Settings > Security>Enable Studio Access To API Services set to true?
If your testing in studio.

yes its active since the start of the creation of the game ^^

im not good in script sorry x)

Another question… This script is inside server script service, correct?

Also, keep it to CharacterAdded

yep and the billboardgui is inside server storage

what is the difference enter playeradded and characteradded ?

“CharacterAdded” is actually what it sounds like. It detects a player’s character if it spawns or respawns this character is part of the player. PlayerAdded is basically an event that detects if the ‘player’ has either disconnected or connected to the game. If you wanted to manage the appearance of a player you would need to identify it in the character, characteradded. If your loading a players stats or leaderboards you use playeradded.

1 Like

ooh i see thanks! but it doesn’t fix my problem … I just want it to appear when the player buy the pass x) it shouldn’t be complicated :frowning: after this i can publish my first game on roblox! :smiley:

1 Like

In regards to this question, you used a youtube tutorial for this. Which video did you use?

this