I want to find if the userid is in the table below or not when the user is joining the game…

I need this for my nametag script…
TRIED so far:

Varables:
I want to find if the userid is in the table below or not when the user is joining the game…

I need this for my nametag script…
TRIED so far:

Varables:
if Boosters[P.Name] == P.UserId then
end
if you wanted to use table.find(), then you should just store the UserId, you don’t need to make the Name equal the UserId
then you could do
if table.find(Boosters,P.UserId) then
end
loop through the table.
game.Players.PlayerAdded:Connect(function(plr)
for i = 1, #table do --table being your dictionary
if table[i][UserId] == plr.UserId then -- You'll have to reconstruct this phrase to reference the key in the dictionary
--More code here
end
end
end)
Thanks very much for the help you are a star!
You hevally over complicated something so simple.
There are multiple ways to go about any one task.
Neither are wrong, just different. Mine checks when a player joins, looping through a table, which stores a reference so you can easily check other members of the specific key. The other answer is great for checking a single piece of data, but fails to reference the key.
Both answers work, they are just used in different scenarios.