Why wont my rank only door work?

You read the title :wink:

Code:

I can’t pass through the door. Also I have a syntax error that I don’t know how to fix. :joy: :joy: :joy:

1 Like

I think it’s because you didn’t actually put the group id in…

You wrote the groupid vairable as groipid

In that local variable at the top you spelled groupId wrong.

I spelt group id wrong :rofl: :rofl: :sweat_smile: Sorry for waisting your time.

1 Like
local groupId = 9155359
local minrank = 200
local StaffOnlyDoor = game.Workspace.StaffOnlydoor
local Player = game.Players.LocalPlayer

StaffOnlyDoor.Touched:Connect(function()
 if Player:GetRankInGroup(groupId) >= minrank then
     StaffOnlyDoor.CanCollide = false
     StaffOnlyDoor.Transparency = 0.5
 else
      StaffOnlyDoor.CanCollide = true
      StaffOnlyDoor.Transparency = 0
    end
end)
1 Like