I’m trying to get a UserId system to detect whether a user can have access to an admin panel or not in a local script.
I’m trying to have this happen:
But this is what happens instead:
So far I’ve tried
game.Players.PlayerAdded:Connect(function(plr)
game:GetService("Players")
if plr.UserId == 1161714789 then
script.Parent.Visible = true
else
script.Parent.Visible = false
end
end)
local allowed = ("CLS0211")
game.Players.PlayerAdded:Connect(function(plr)
for i, v in pairs(allowed) do
if plr.Name == v then
script.Parent.Visible = true
end
end
end)
game.Players.PlayerAdded:Connect(function(plr)
if plr.Userid == 1161714789 then
script.Parent.Visible = true
else
script.Parent.Visible = false
end
end)