Log in to vote

How do I make this door?

Asked by 7 years ago

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

Log in to vote
Answered by 7 years ago

you could use the :IsInGroup() method like this

door = script.Parent
if prt.Parent and game.Players:GetPlayerFromCharacter(prt.Parent) and game.Players:GetPlayerFromCharacter(prt.Parent) :IsInGroup(132707) then
door.CanCollide = false
door.CanCollide = true

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


Answer this question