So I basically want to make a staff room, where only some users that I choose can enter. How can I do that?
Also I know that it would work if I just gives a badge to these users but I don’t want to create a badge just for that. If it’s the only solution well, I will do that.
I searched on Google but I found nothing that could really work, maybe I missed something.
You could make a localscript check the grouprank, if the grouprank is good. Make the parts where they are allowed to enter cancollide off. You could use a whole part so you know when someone is exploiting or block only the door.
Place this code into a Local Script in StarterPlayerScripts
local Zone = require(game:GetService("ReplicatedStorage").Zone)
local container = game:GetService("Workspace").CheckPart
local allowpart = game:GetService("Workspace").AllowPart
local zone = Zone.new(container)
local allowedplayers = {} -- enter player user IDs here. Separate with commas.
zone.playerEntered:Connect(function(plr)
local check = table.find(allowedplayers, plr.UserId)
if check ~= nil then
allowpart.CanCollide = false
else
allowpart.CanCollide = true
end
end)
CheckPart is a large, invisible, uncollidable part placed in front of Allowpart. It must have CanQuery on.
AllowPart is the door to the staff room.