#problem with StarterGui
9 messages · Page 1 of 1 (latest)
you could just not use names and only ids, they're a more reliable way to identify a person because anyone can change their name
local IDs = {1929129, 129129129}
local player = game.Players.LocalPlayer
local playerID = player.UserId
local hasAccess = false
for i, v in pairs(IDs) do
if v == playerID then
hasAccess = true
end
end
if hasAccess then
script.Parent.Enabled = true
else
script.Parent:Destroy()
end
this script allows you to add however many ids you want without changing the rest of the script
the problem before was that it would check if the id AND name matched, and because the ids were invalid, it would destroy it even if the name matched
i rearranged some stuff
it works?
alright
glad i could help