I’ve been trying to establish a script that does not give the player a tool if they aren’t on selected team.
local ToolNames = {"Carl Gustaf"}
local Storage = game:GetService("ServerStorage")
local Teams = game:GetService("Teams")
local Part = script.Parent
local ClickDetector = Part:WaitForChild("ClickDetector")
ClickDetector.MouseClick:Connect(function(Player)
if Player and Player.Character then
local playerTeam = Teams:(Player)
if playerTeam and playerTeam.Name == "11th MEU" then
local Backpack = Player:WaitForChild("Backpack")
for i = 1, #ToolNames do
local Tool = Storage:FindFirstChild(ToolNames[i])
if Tool then
Tool:Clone().Parent = Backpack
end
end
end
end
end)