Basically this guy made a really advanced script, and I customized the stuff I wanted on it and it does not work, this is the script
------------ 02 --SETTINGS-- 03 ------------ 04 --Current Group-- 05 GroupIdenabled = true--Enable or Disable the group and rank check feature, as well as Exceptions settings below. Set "true" to enable and "false" to disable. 06 -----Group 1---- 07 GroupId = 4802900 --Change this to GroupID of your group. 08 min = 10 --Change this to the minimum Group Rank Value of your group "GroupId" above (Rank 0-255) a Player can enter. NOTE: Replace with "-1" if you wish to disable this Rank Value. 09 max = 255 --Change this to the maximum Group Rank Value of your group "GroupId" above (Rank 0-255) a Player can enter. NOTE: Replace with "-1" if you wish to disable this Rank Value. 10 -----Group 2---- 11 GroupId2 = -1 --Change this to GroupID of your group. NOTE: Replace with "-1" if you wish to disable this Group or do not wish to use it. 12 min2 = -1 --Change this to the minimum Group Rank Value of your group "GroupId2" above (Rank 0-255) a Player can enter. NOTE: Replace with "-1" if you wish to disable this Rank Value. 13 max2 = -1 --Change this to the maximum Group Rank Value of your group "GroupId2" above (Rank 0-255) a Player can enter. NOTE: Replace with "-1" if you wish to disable this Rank Value. 14 -----Group 3---- 15 GroupId3 = -1 --Change this to GroupID of your group. NOTE: Replace with "-1" if you wish to disable this Group or do not wish to use it. 16 min3 = -1 --Change this to the minimum Group Rank Value of your group "GroupId3" above (Rank 0-255) a Player can enter. NOTE: Replace with "-1" if you wish to disable this Rank Value. 17 max3 = -1 --Change this to the maximum Group Rank Value of your group "GroupId3" above (Rank 0-255) a Player can enter. NOTE: Replace with "-1" if you wish to disable this Rank Value. 18 Exceptions = {"Player1"} --[[Put names of Players that are exempted from the rank, group, and/or ItemID system. 19 This can be used to allow non-group members or anyone you want, clearance through the door. Put their names 20 in this format:{"Playername","Playername2"} NOTE: To disable remove the names from this list.--]] 21 22 --Item ID-- 23 ItemIdenabled = false --Enable or Disable the Item ID feature. Set "true" to enable and "false" to disable. 24 ItemId = 0 --The item/badge they can own in their inventory to allow passage through the door. Change it to the ItemID of the specific item/badge which is the Numbers at the end of the link to that Badge or Item. 25 26 --Specific Settings-- 27 local KilluponTouched = true --If "true", kills non group members/incorrectly ranked members, if "false" does not let them in. 28 local WaitTime = 3 --Amount of time door remains open before closing. 29 DoorTransparency = 0 --Change this value to the Transparency you want the door to return to. (ex. 0=For Solid) 30 Door = script.Parent --Do not modify or remove. 31 Q = false --Do not modify or remove. 32 ---------- 33 --Script-- 34 ---------- 35 --Checks the Player Against Names in "Exceptions" List-- 36 function CheckExceptions(name) 37 for i = 1,#Exceptions do 38 --Converts Strings to all Upper Case-- 39 if (string.upper(name) == string.upper(Exceptions[i])) then return true end 40 end return false end 41 42 --Makes Sure Player is Within Guidelines (Correct rank, group, possible exceptions, and/or they have the correct item within their inventory)-- 43 --Group Check-- 44 if GroupIdenabled == true then 45 function Touched(Part) 46 local Human = Part.Parent:findFirstChild("Humanoid") 47 if Q then return end 48 Q = true 49 if Part.Parent then 50 p = game.Players:FindFirstChild(Part.Parent.Name) 51 if p then 52 if p:GetRankInGroup(GroupId) >= min and p:GetRankInGroup(GroupId) <= max or p:GetRankInGroup(GroupId2) >= min2 and p:GetRankInGroup(GroupId2) <= max2 or p:GetRankInGroup(GroupId3) >= min3 and p:GetRankInGroup(GroupId3) <= max3 or (CheckExceptions(Human.Parent.Name))then 53 AccessGranted() 54 else 55 print("Nice Try, Skrub") 56 if KilluponTouched then Part.Parent:breakJoints() 57 script.Parent.Denied:play() 58 end end end end Q = false end end 59 60 --Item Check-- 61 if ItemIdenabled == true then 62 function Touched(Part) 63 local Human = Part.Parent:findFirstChild("Humanoid") 64 if Q then return end 65 Q = true 66 if Part.Parent then 67 p = game.Players:FindFirstChild(Part.Parent.Name) 68 if p then 69 if game:getService"BadgeService":UserHasBadge(p.userId,ItemId)then 70 AccessGranted() 71 else 72 print("Own the Item to Gain Access") 73 if KilluponTouched then Part.Parent:breakJoints() 74 end end end end Q = false end end 75 76 --Opens Door If Player's Rank was Correct-- 77 function AccessGranted() 78 print("Access Granted") 79 Door.Transparency = 1 80 Door.CanCollide = false 81 script.Parent.Granted:play() 82 wait(WaitTime) 83 Door.CanCollide = true 84 Door.Transparency = DoorTransparency 85 end 86 87 88 Door.Touched:connect(Touched)