Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Add tools to a team(?)

Asked by 9 years ago

How do I tools to a team? that every team member will get tools that belong only to his team.

2 answers

Log in to vote
1
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

That's more of a request. To do so, you'll need to have knowledge of the CharacterAdded event, Clone method, Parenting, and the Changed event.

Ad
Log in to vote
0
Answered by 9 years ago

Connect to the ChildAdded event of Players, and then connect to the CharacterAdded event of each Player that gets added. In that event, check the player's TeamColor property, and clone a tool into their Backpack if it matches with the correct team.

To make this work in Solo, be sure to check for players that were added before you connected to the ChildAdded event.

Answer this question