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 this door?

I am making a place for the group: C&G Council I want to make a door which only allows this group to pass, but I want to be able to allow players who aren't in this group pass through the door if I press a certain button.

So basically, I will have a control room with buttons (parts you can click) and one of those buttons to do what I mentioned above.

1 answer

you could use the :IsInGroup() method like this

door = script.Parent
door.Touched:connect(function(prt)
if prt.Parent and game.Players:GetPlayerFromCharacter(prt.Parent) and game.Players:GetPlayerFromCharacter(prt.Parent) :IsInGroup(132707) then
door.CanCollide = false
wait(5)
door.CanCollide = true
end)

and in another script you could have it connect to a ClickDetector to open the door for all users

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