I’m making a WW2 game, but I don’t know how to put helmets and webbings on players on specific teams. I have a script that puts clothing on teams, but doesn’t have anyway to give them accessories.
Attachments and the accessory system is a great way to do this. I use it in my game for custom accessories like backpacks and belts. Here’s a great starting place for this:
Splitting up the accessories based on team is very easy, just detect what team the player is on and attach the correct corresponding accessory.
The post only put the sword only onto him. How do I make it so that everyone that joins the game spawns with the accessory?
Attach it to each player as they join in a PlayerAdded connection, or attach it to each player in a CharacterAdded connection so that they get it every time they spawn.
The whole post is meant to be sample code and to demonstrate that you can use accessories, which are severely underappreciated, for attaching items to players. It’s not meant to be a catch-all to explain how to fully use accessories. You can salvage this content for your own cases: I focused on the use of accessories for attaching things to a player’s hands without tools.
You will have to salvage this code and do a bit of your own research in order to better use the concepts put forth in that response for your own cases. In the case of making morphs for players, you can still use this post but it’ll majorly come down to your own work. The principles are:
- Weld everything to a root of sorts
- Make an attachment in your root that matches one in the character model
- Add the accessory
Similar post I’ve written in the past: