I want to remove all GUIs except those named something, so I am trying this
local playergui = player.PlayerGui:GetChildren()
local values = {player.PlayerGui.Shop.Name, player.PlayerGui.Boom.Name, player.PlayerGui.Boom.Name}
if playergui.Name == values
print('All is good')
-- Do nothing
else
playergui:remove()
end
However I am getting, line 22 attempt to call method 'remove' a nil value

2 comments
@Thetacah made a reply to another post of mine that is similar, I will try and see if that works. Will report back
That did not seem to work, I still have the same error as above.