Here, I got this script and I want it to only run for a specific rank and up in a group, if anyone can do this it will be appreciated.
local Opened = script.Parent.Opened
function Open(Part, Type)
if Opened.Value == false then
if game.Players:FindFirstChild(Part.Parent.Name) or game.Players:FindFirstChild(Part.Parent.Parent.Name) then
Opened.Value = true
for i = 0.1,5.4, 0.1 do
script.Parent.DoorLeft.CFrame = script.Parent.DoorLeft.CFrame * CFrame.new(0.1,0,0)
script.Parent.DoorRight.CFrame = script.Parent.DoorRight.CFrame * CFrame.new(-0.1,0,0)
wait()
end
wait(script.Parent.WaitTime.Value)
for i = 0.1,5.4, 0.1 do
script.Parent.DoorLeft.CFrame = script.Parent.DoorLeft.CFrame * CFrame.new(-0.1,0,0)
script.Parent.DoorRight.CFrame = script.Parent.DoorRight.CFrame * CFrame.new(0.1,0,0)
wait()
end
Opened.Value = false
end
end
end
script.Parent.Field1.Touched:connect(Open)
script.Parent.Field2.Touched:connect(Open)
