Client Sided Team Door

Does anybody have a Client-Sided team door? So basically if your on that team the door is no longer on CanCollide but if you aren’t on the team CanCollide is on? I’m not a scripter so I’m not sure if this is possible

Why do you want to make the team doors Client-sided?

Edit: Teams are usually on the server, so the rightful idea is to make them in server script I guess

--localscript
local player = game.Players.LocalPlayer
local Teams = game:GetService("Teams")

if Teams.Red[player] then --try this I will test some things in studio rn
    --code
end

Do it like team fortress 2, put an barrier

But he needs it to be non collidable after someone joins a certain team

I am pretty sure that you can use collision groups for this. Then you can make a group for each team. Luckily, there is this article right here: Collision Filtering | Roblox Creator Documentation.

Just so the people can’t glitch in when someone walks through the door

You can check players team by using a script (Sorry for late answer lol)w

local part = put your door here (should be like script.Parent or game.Workspace.PartNameHere)

part.Touched:Connect(function(hit)
    if hit:FindFirstChild("Humanoid") then
    local player = game.Players:FindFirstChild(hit.Parent.Name)
        if player.Team == game.Teams.TeamNameHere then
             part.CanCollide = false
         end
     end
end)

Script can’t be in workspace by the way.

I recommend using collision groups because they are server sided and exploiters cant easily open close any doors they want but if you do it client sided they can do whatever want with the doors so ise collision groups you can find a lot of information about it on devhub so I recommend checking it