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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How do i make multiple scripts help.

Previous Thread :: Next Thread 
Aisoc is not online. Aisoc
Joined: 08 Jun 2013
Total Posts: 412
08 May 2014 12:44 PM
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=155648123"
character.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=155648378"
end)
end)

here i made one but its doesnt works.
Report Abuse
Aisoc is not online. Aisoc
Joined: 08 Jun 2013
Total Posts: 412
08 May 2014 12:46 PM
Bump.
Report Abuse
ninja5566 is not online. ninja5566
Joined: 14 Jan 2009
Total Posts: 5233
08 May 2014 12:47 PM
the script will error if someone is not wearing a shirt.
Report Abuse
Aisoc is not online. Aisoc
Joined: 08 Jun 2013
Total Posts: 412
08 May 2014 12:47 PM
Huh, how do i fix it than ?
Report Abuse
Aisoc is not online. Aisoc
Joined: 08 Jun 2013
Total Posts: 412
08 May 2014 12:58 PM
Bump just little bit tip.
Report Abuse
EliteGuest4999 is not online. EliteGuest4999
Joined: 25 Jul 2012
Total Posts: 13
08 May 2014 01:10 PM
lol
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
08 May 2014 01:19 PM
Oh, the wonders of pcall! Replace your two lines setting shirt and pants with this bit.

if pcall (function() character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=155648123"end)
then return else return end
if pcall (function() character.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=155648378"end)
then return else return end

--Shira Wolven
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
08 May 2014 01:25 PM
That's pcall abusing.
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
08 May 2014 01:27 PM
Does it matter? It works and if there's a shirt/pants it'll run and return, and if there isn't, it'll just return. Plus it's quick, dirty, and efficient.

--Shira Wolven
Report Abuse
Aisoc is not online. Aisoc
Joined: 08 Jun 2013
Total Posts: 412
08 May 2014 01:51 PM
Ummm what pcall does ?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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