So I have this script to make a GUI available to only certain people. However, I would like to know how to adapt this to making a LocalScript only enabled for certain people.
Help is greatly appreciated.
Script:
local Table_Of_Names = {"ThrashIsDead","poophead27272","darkslayer741"}; if table.find(Table_Of_Names,game:service'Players'.LocalPlayer.Name)then script.Parent.Enabled = true else script.Parent.Enabled = false end;
It's bad practice to enable and disable scripts like this, instead use if statements.
local Players = game:GetService("Players") local localplayer = Players.LocalPlayer local Admins = {['azarth'] = true} local IsAdmin = Admins[localplayer.Name:lower()] if IsAdmin then print ("Admin") end