So I've got the player list gui and admin doors down, i'm not sure how to actually make it so that someone of a certain rank in a group can select players from a gui to have temporary access through a door until they leave.
Help would be great! Sorry I'm new at this : (
You can Use this with no rank ID.
GroupID = 1014065 Door = script.Parent Kill = false Teleport = false X = 0 Y = 0 Z = 0 DB = false script.Parent.Touched:connect(function(p) if p.Parent:FindFirstChild("Humanoid") then player = game.Players:GetPlayerFromCharacter(p.Parent) if player then if not DB then DB = true if player:IsInGroup(GroupID) then if not Teleport then Door.Transparency = 0.5 Door.CanCollide = false wait(0.2) Door.Transparency = 0 Door.CanCollide = true DB = false elseif Teleport then player.Character.Torso.CFrame = CFrame.new(X,Y+2,Z) DB = false end elseif not player:IsInGroup(GroupID) then if Kill then p.Parent.Humanoid.Health = 0 DB = false elseif not Kill then DB = false end end end end end end)
Or if for a certain rank us this.
local rank = 0 -- The rank the player will need to get through (out of 255) local groupID = 0 -- The group ID the player must be in script.Parent.Touched:connect(function(hit) if (hit and hit.Parent and game.Players:FindFirstChild(hit.Parent.Name)) then if (game.Players[hit.Parent.Name]:IsInGroup(groupID) and game.Players[hit.Parent.Name]:GetRankInGroup(groupID) >= rank) then script.Parent.CanCollide = false script.Parent.Transparency = .9 wait(1) script.Parent.CanCollide = true script.Parent.Transparency = 0 else script.Parent.CanCollide = true end end end)