So basically when a player joins it's supposed to check if their userid is in the table, if it is then their rank value will be staff, if not, it will be guest. I didn't put my ID in the table but it still sets my value as staff instead of guest.
local staff = {"11", "131226890", "169602215"}
game.Players.PlayerAdded:Connect(function(plr)
local userid = plr.UserId
local leader = Instance.new("Folder")
leader.Name = "leaderstats"
leader.Parent = plr
local rank = Instance.new("StringValue")
rank.Name = "RANK"
rank.Parent = leader
for i, userid in pairs(staff) do
if userid then
rank.Value = "STAFF"
else
rank.Value = "GUEST"
end
end
end)

1 comment
Is this a local script? If it is, change it. Also, are you checking from the explorer or the server?