im making an scp game
✓ ANSWER ACCEPTED
how can i give people clothes if they are on a certain team and only when a round began?
2 answers
✓ Accepted answer
Just add that when the round starts
for i,v in pairs(game.Players:GetPlayers()) do
if v.Team == game.Teams.Team1 then --First team
if v.Character:FindFirstChild("Shirt") then
v.Character:FindFirstChild("Shirt").ShirtTemplate = "" -- shirt asset id
else
local Shirt = Instance.new("Shirt")
Shirt.Parent = v.Character
Shirt.ShirtTemplate = "" -- shirt asset id
end
elseif v.Team == game.Teams.Team2 then --Second team
if v.Character:FindFirstChild("Shirt") then
v.Character:FindFirstChild("Shirt").ShirtTemplate = "" -- shirt asset id
else
local Shirt = Instance.new("Shirt")
Shirt.Parent = v.Character
Shirt.ShirtTemplate = "" -- shirt asset id
end
end
end
You could do a player added function and do an if statement to see if the player is on that team. Here's what I mean:
game.Players.PlayerAdded:Connect(function(player)
if player.TeamColor == "" then -- In the quotes, put your team's color
player.Character:WaitForChild("Shirt").ShirtTemplate = "rbxassetid"--Your shirt id
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
yeah but, the problem is i want it to be only when a round began