Hey everyone! Im in a state of a problem where I want to have a script on where it gives you shirts/items for a specific team but I dont have any idea on how to make it. So if you have a script for it, Please leave it down here and maybe tell me the location on where to put the script aswell. Thanks
What would you like to activate the script? A button? A proximity prompt (press e)?
automatic if its available but a button would be better
So when a players team is set, it changes their clothes and gives them tools?
I meant like only the clothes and like vests or helmets, the tools are already done. my bad
I usually script clothing givers like Proximity Prompts, buttons and even when they join, they auto-gives them.
But I’m not sure If I can make you a script in every team.
ill try to edit it to correspond to the teams i made
Just store the id of the shirts and items for each team.
local teams = {
["Red"] = {ShirtId = shirt_id; Item = item;}
["Blue"] = {ShirdId = shirt_id; Item = item;}
}
Here’s a little function,
function connectTeamClothing (player, team, customShirtId, customPantsId)
player:GetPropertyChangedSignal("Team"):Connect(function()
if player.Team == team then
local character = player.Character;
if character then
for _, clothing in pairs(character:GetChildren()) do
if clothing:IsA("Clothing") then
clothing:Destroy();
end
end
Instance.new("Shirt", character).ShirtTemplate = customShirtId;
Instance.new("Pants", character).PantsTemplate = customPantsId;
end
end
end)
end
When the player specified in the first argument, has their team changed to the team specified in the second argument, their clothing will change to the ones specified in the third and fourth arguments.
The function is easily customisable to add accessories and give tools, happy coding