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 » Scripting Helpers
Home Search
 

Re: Random Shirt Pant chooser?

Previous Thread :: Next Thread 
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Apr 2014 05:06 PM
This is what I have in my script, and it takes off my player's clothing but does not replace it with the new one because :

17:01:18.944 - Image failed to load: http://www.roblox.com/asset/?id=108129063: Failed to resolve texture format

or when I enter it from the catalog's link :

Image failed to load: http://www.roblox.com/Red-Adidas-Hoodie-item?id=108129063: Request failed

script :

prefix = "http://www.roblox.com/asset/?id="

shirtTable = {prefix.."108129063",
prefix.."153068618", prefix.."146978987"
}

pantTable = {prefix.."89224181", prefix.."110454553",
prefix.."59869182",
prefix.."98355682"
}

function changeClothes(char)
local s = char:FindFirstChild("Shirt")
s.ShirtTemplate = shirtTable[math.random(1, #shirtTable)]
wait() local p = char:FindFirstChild("Pants")
p.PantsTemplate = pantTable[math.random(1, #pantTable)]
print "Clothing randomized."
end

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
wait(2) print "en guarde" wait(2) changeClothes(char)
end)
end)
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Apr 2014 05:14 PM
b1
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Apr 2014 05:18 PM
b2
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Apr 2014 05:31 PM
b3
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Apr 2014 05:42 PM
b4

...
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Apr 2014 05:44 PM
b5
Report Abuse
masterCameron101 is not online. masterCameron101
Joined: 28 Mar 2010
Total Posts: 1377
22 Apr 2014 05:55 PM
Subtract the asset ID by 1, if that doesn't work then try 2.

~masterCameron101, advanced Lua programmer, certified graphics designer and geek~
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Apr 2014 06:21 PM
THANK YOU.
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