Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a door that only people in my group can go through?

I want to make a door that people in my group can walk through but people not in the group can't. Also they have to have their rank 3+.

Group ID: 2695224

1 answer

Next time please just look on the wiki for a group door.

But what you want is to use the GetRankInGroup() method.

local door = script.Parent --Define the door
door.Touched:connect(function(part) --Connect the function
	if part.Parent:FindFirstChild("Humanoid") ~= nil then --If it is a player
		if game.Players:FindFirstChild(part.Parent.Name):GetRankInGroup(2695224) >= 3 then --Check the rank
			door.Transparency = 1
			door.CanCollide = false
			wait(2)
			door.Transparency = 0
			door.CanCollide = true
		end
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.