Rank only door work?

The script was working perfectly fine, not sure what happend.


My clothing group has been struggling to gain any members. I have to tell people about it, and some people don’t even check it out. I’d really appreciate if you joined or affiliate with my group to gain members. :grin: CompleteClothing.

1 Like

What is the problem with your code?

When I try to go through the door, I can’t.

Try adding print statements inside the if statement?

Do you have it set to do the if statement on player joining the game? Nvm. I can see you don’t

What do you mean? I don’t understand what you are saying.

Sorry, I forgot that you are checking via local script.

How would I do that? Thank you for helping me.

I think this might help idk though

The door was working fine, I could pass through, but now I can’t seem too. Not sure if this is the problem but I installed a plugin “Load catalog items” or something like that and a message came up saying “Do you allow scripts to be modified” I’m not sure exactly what it said. Load Catalog Items - Roblox

Just do

local groupId = 9155359
local minrank = 200
local StaffOnlyDoor = workspace.StaffOnlyDoor
local Player = game.Players.LocalPlayer
local PlayerRank = Player:GetRankInGroup(groupId)

print("Does the script even work...?")

if PlayerRank >= minrank then
    StaffOnlyDoor.CanCollide = false
    print("The Door has been opened for: "..Player.Name)
elseif PlayerRank < minrank then
    StaffOnlyDoor.CanCollide = true
    print("The Door has been disabled for: "..Player.Name)
    print("What, H O W")

Also make sure that the groupId you’re entering is the correct one


Well, what does “The door has been open for” mean?

That’s just a print statement for debugging.

1 Like

Yeah, so the output would be, “The Door has been opened for: ThisPlayerName”

I’d also like to point out that the (Local)script is inside of “StarterGui”, also the script doesn’t work. :sweat_smile:

Ok. Usually I would put the local scripts like these inside of PlayerStarterScripts.

Unless you want to deal with guis.

1 Like

Try it again, I added another print outside the if statement


Should I have my output out? I don’t right now.

Yeah definitely you should, the Output basically gives you what actually printed or not when debugging stuff like this (It also shows you the errors in certain scripts as well)

1 Like

I think I know the problem. I put everything in a folder called “Storage”