Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Help with this TeamStarterpack script?

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 answer

Remove this script and add the weapons inside the Team (game.Teams.TheTeamYouWantTheToolsIn)

Trust me, it'll work.

This discussion is preserved as it was. New answers, comments, and votes are closed.