local ClickDetector = script.Parent --The ClickDetector
local AllowedTeam = game.Teams.AllowedTeam --Direction to the Team which is allowed
ClickDetector.MouseClick:Connect(function(Player)
if Player.Team == AllowedTeam then
--Whatever you want to happen if the player clicks and is in the team
end
end)
Make sure its an normal Script, not an Module or Local Script
yes, create an Script in ClickDetector (a normal Script) and change the Variables and put your Script what should happen in the Line marked with “Whatever you want to happen if the player…”