How do I make a invisible wall for a certain role in a group

Oh if thats the case then:

local door = game.Workspace.door --Change this if you want
local groupId = 1 --Change this to the group
local minimumRank = 20 -- Change this
local player = game.Players.LocalPlayer

if player:GetRankInGroup(groupId) >= minimumRank then
    door.CanCollide = false
end