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

How do I create player access through an admin door by selecting players on a player gui?

Asked by 4 years ago

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 : (

0
So what I think you should do is use a admin module and there is a section where its for group ranks and you can just put the ID of the group rank there then they can enter the room with a group only door. vincentthecat1 199 — 4y
0
if you want to do That just admin the player for a little bit and to make it easier I recommend using a group ID door for the certain rank and the admin door for the temp admins or you can put the scripts together in a way that's what I recommend. vincentthecat1 199 — 4y
0
but after my ranks script if you want it to be for admins and or group members put or so yours or mine can be put in! vincentthecat1 199 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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)
0
If they don't work just tell me! vincentthecat1 199 — 4y
Ad

Answer this question