Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 9 years ago

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

Log in to vote
1
Answered by 9 years ago

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

Ad

Answer this question