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
local groupID = 0
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)
3 comments
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.
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.
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!