Rank only door work?

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)
else
    print("What, H O W")
end

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

2 Likes

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

2 Likes

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”

Having the output in view is very important for debugging. It will let you know of any possible errors, making it easier to fix any issues

If you put the door in Storage, then simply change

local StaffOnlyDoor = workspace.StaffOnlyDoor

To this:

local StaffOnlyDoor = workspace.Storage.StaffOnlyDoor

Or wherever it’s parented to

2 Likes

Screenshot 2021-03-11 at 23.21.42
No luck. :weary: :cold_sweat: :sob: