generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

How to give players in game certain clothes.

Previous Thread :: Next Thread 
AbovePi is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image