Hello. I added lines to the script, so instead of letting players pass doors who are from my group, instread it lets door be passed by specific ranks on my group, so i changed the script a bit, but now the doors are not working at all!
CurrentGroup = 2684229 -- Change this to GroupID of your group
Door = script.Parent -- Do not modify
IsActive = false -- Do not modify
KillOnContact = false -- If true, kills non group members, if false does not let them in.
WaitTime = 2 -- Amount of time door remains open
G1 = script.Parent.Parent.Green1
G2 = script.Parent.Parent.Green2
R1 = script.Parent.Parent.Red1
R2 = script.Parent.Parent.Red2
function Touched(Part)
if IsActive then return end
IsActive = true
if Part.Parent then
Player = game.Players:playerFromCharacter(Part.Parent)
if Player then
if Player:IsInGroup(CurrentGroup) then
if Player:GetRankInGroup(CurrentGroup) == 255
if Player:GetRankInGroup(CurrentGroup) == 254
if Player:GetRankInGroup(CurrentGroup) == 80
end
end
Open()
else
print("Atleast it exists?")
R1.BrickColor = BrickColor.new("Really red")
R2.BrickColor = BrickColor.new("Really red")
if KillOnContact then Part.Parent:breakJoints()
wait(WaitTime)
R1.BrickColor = BrickColor.new("Black")
R2.BrickColor = BrickColor.new("Black")
end
end
end
end
IsActive = false
end
function Open()
G1.BrickColor = BrickColor.new("Lime green")
G2.BrickColor = BrickColor.new("Lime green")
Door.Transparency = 1
Door.CanCollide = false
wait(WaitTime)
G1.BrickColor = BrickColor.new("Black")
G2.BrickColor = BrickColor.new("Black")
Door.CanCollide = true
Door.Transparency = 0
end
Door.Touched:connect(Touched)

1 comment
Read the output. Lines 18-21 aren't even finished.