Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I've developed this script and I don't know what's the problem?

Btw I'm a beginner's scripter and I would like some advice on this scipt

local access = {"Player's name"}---------I'm trying to make a script that destroys a gui when a player's name is listed, If their name is not listed it remove the scripts instead
local Player = game.Players.LocalPlayer
local Children = script.Parent.Parent:GetChildren()

for i = 1, #access do 
if access[i]:lower() == Player.Name:lower() then 
script.Parent:Destroy()------removes the gui
else 
Children[i]:IsA("Script") then --------removes scripts 
Children[i]:Destroy()
end
end



-- what did I do wrong??

1 answer

LocalPlayer is an object only usable in a LocalScript, is this a Script or a LocalScript? You should specify these things.

This discussion is preserved as it was. New answers, comments, and votes are closed.