I wanted to add team specific gear, but everything I try fails miserably. I have tried several youtube videos and forums and every single one only worked in studio or did not work at all.

I have five teams and one neutral team. What I am trying to do is give players a specific item when they join a team and if they die then they will still have the item. I want this script to work when people actually join the game and not only in studio mode.

should i change it to a local script? I want to write my own script but I dont even really know how to start. How would I write a script that allows each team to have different gear? Is the whole thing broken or am i overlooking something?

It doesnt work at all and I'm not sure how to fix it. I have each tool in each team(the thing with the soccer ball).

This is the script I am working with. I found it and am trying to edit it. I am a really new scripter.

function teamFromColor(color) for _,t in pairs(game:GetService("Teams"):GetChildren()) do if t.TeamColor==color then return t end end return nil end

function onSpawned(plr) local tools = teamFromColor(plr.TeamColor):GetChildren() for _,c in pairs(tools) do c:Clone().Parent = plr.Backpack end end

function onChanged(prop,plr) if prop=="Character" then onSpawned(plr) end end

function onAdded(plr) plr.Changed:connect(function(prop) onChanged(prop,plr) end) end

game.Players.PlayerAdded:connect(onAdded)