I wrote this script a while back, and it used to work fine. But now for some reason, it doesn't work. Basically, it's supposed to give the Player a weapon based on the team they're on. It's a regular script, and it's stored in StarterPack. Filtering enabled is on.
local AXISWeapons={'MP40'};
local ALLIEDWeapons={'Thompson'};
--repeat wait(.02) until script.Parent.Parent and game:GetService('ServerStorage')
local Player,SerStorage=script.Parent.Parent,game:GetService('ServerStorage');
if Player.TeamColor==BrickColor.new('Bright red') then --When being Axis
for _,v in pairs(AXISWeapons) do
SerStorage:FindFirstChild(v):Clone().Parent=script.Parent
end
elseif Player.TeamColor==BrickColor.new('Bright green') then --When being Allied
for _,v in pairs(ALLIEDWeapons) do
SerStorage:FindFirstChild(v):Clone().Parent=script.Parent
end end

1 comment
It is a regular script, not a local script.