✓ Accepted answer
1 Always keep this inside the game :)
2 just put the tool you want to give to the teams into their team under the Teams section
PUT In TO A Script
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 = fromTeamCOlor(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)
Hope this helps!
3 comments
I dont think you understood but thanks for the reply! I want the owner of the tycoon to have to purchase this model first and then when other members of the same team color that the model is set to will then add the tool to that persons starter pack. I dont want them to get the tools until they get them from this giver. Thanks!
ok, i will try to fix it
Thank You much!