AbovePi
|
  |
| Joined: 09 Feb 2015 |
| Total Posts: 134 |
|
|
| 07 Jul 2015 07:54 PM |
| I want to give every player that joins and respawns a certain shirt and pants, how would i do this. |
|
|
| Report Abuse |
|
|
piepiedog
|
  |
| Joined: 16 Nov 2008 |
| Total Posts: 1326 |
|
|
| 07 Jul 2015 08:01 PM |
You can either wear the clothing yourself, then copy and paste it into Lighting or Starterpack or something, then when a player joins remove their clothes and copy the new ones onto them.
That or use InsertService. The only reason this wouldn't be my first suggestion is because I don't know if will import shirts/pants, but I don't see why not. |
|
|
| Report Abuse |
|
|
piepiedog
|
  |
| Joined: 16 Nov 2008 |
| Total Posts: 1326 |
|
|
| 07 Jul 2015 08:09 PM |
Insert Service does work. It's something like this, placed in starterpack (this is untested so there are probably errors):
player=nil
for _,v in pairs(game.Workspace:GetChildren()) do if v.Name == script.Parent.Parent.Name then player=v end end
if player.Shirt then player.Shirt:Remove() end
if player.Pants then player.Pants:Remove() end
if player.tshirt then player.tshirt:Remove() end
n = game:GetService("InsertService") a = n:LoadAsset(insert shirt asset ID here) for _, l in pairs(a:GetChildren()) do l.Parent = player end
n = game:GetService("InsertService") a = n:LoadAsset(insert pants asset ID here) for _, l in pairs(a:GetChildren()) do l.Parent = player end
script:Remove() |
|
|
| Report Abuse |
|
|