#problem with StarterGui

9 messages · Page 1 of 1 (latest)

lethal bronze
#

are those ids valid

#

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
lethal bronze
#

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