Best way to make a team only door?

Hi,

I’m seeing mixed opinions on making a team-only door. Do people still script it or can we use collision groups now?

Yeah you could use collision groups and most likely make the door non collidable with that only team collision group. It’s just a way of many other ways of accomplishing this but it’s possible yeah

You could use a local script that would detect touch and then check the player’s team and then disabling canCollide on the door, but collision groups are way more efficient

Try this in a server script :

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
for _, v in char:GetDescendants() do
if v:IsA("BasePart") then
v.CollisionGroup = player.Team
end
end
end)
end)

And then set the door’s collision group to the team’s name

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.