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

Can someone fix this? [Easy] [Unsolved]

Someone fix it please it's suppose to delete the Chosen team colors tools from players. Thanks

TheTeamColor = "Br. yellowish green" 
game.Players.ChildAdded:connect(function(player)
if player.TeamColor == TheTeamColor then
c = player.StarterGear:GetChildren().remove()
for i = 1,#c do
c[i]:Destroy()
end
end
end)

3 answers

✓ Accepted answer
c = player.StarterGear:GetChildren().remove()

You're trying to call the remove method on a table, which won't work. Try removing the '.remove()' part.

1- You're removing it from StarterGear, if these aren't your intentions, remove them on Backpack. 2-It's ":remove()", Not ".remove()".

Don't forget about :ClearAllChildren()

TheTeamColor = "Br. yellowish green"
game.Players.ChildAdded:connect(function(player)
	if player.TeamColor == TheTeamColor then
		player.StarterGear:ClearAllChildren()
	end
end)

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