I have a door script, that opens the door when you click the click detector. Pretty simple. But, for my game, I need it so only people on a specific team can open the specific door. And also, Multiple teams to open one door would be good. I have a Server Script inside of the click detector that sends info to the other Server Script to actually make the thing move. But, Why isn't this working still?
Original script, (Working):
game.ServerScriptService.RegisterToDoorService:Invoke(script)
New script, (Not working.):
script.Parent.ClickDetector.MouseClick:Connect(function(plr)
if plr.Team == "Patient" then
game.ServerScriptService.RegisterToDoorService:Invoke(script)
end
end)

4 comments
Question, How can I check if they are in either mulitple teams?
Thanks for the answer!
By adding "or plr.Team.Name == 'OtherTeam'sName'" to the if statement.
Ah thanks!