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
 

Re: Why does this not work?

Previous Thread :: Next Thread 
isaac036 is not online. isaac036
Joined: 02 Jan 2013
Total Posts: 2736
01 Apr 2017 01:57 PM
plyr = game:GetService("Players").LocalPlayer plyrteam = plyr.TeamColor local uni = {} uni.Shirt = ########################################### uni.Pants = ########################################### while wait() do if plyr.TeamColor == BrickColor.new("Bright blue") then shirt = plyr.Character:findFirstChild("Shirt") pants = plyr.Character:findFirstChild("Pants") shirt.ShirtTemplate = uni.Shirt pants.PantsTemplate = uni.Pants else return end end Help is very much appreciated, thanks if you can help :D
Report Abuse
isaac036 is not online. isaac036
Joined: 02 Jan 2013
Total Posts: 2736
01 Apr 2017 01:58 PM
plyr = game:GetService("Players").LocalPlayer

plyrteam = plyr.TeamColor

local uni = {}
uni.Shirt = "IDGOTHASHTAGS"
uni.Pants = "IDGOTHASHTAGS"


while wait() do
if plyr.TeamColor == BrickColor.new("Bright blue") then
shirt = plyr.Character:findFirstChild("Shirt")
pants = plyr.Character:findFirstChild("Pants")
shirt.ShirtTemplate = uni.Shirt
pants.PantsTemplate = uni.Pants
else return
end
end
Report Abuse
shootthegame is not online. shootthegame
Joined: 23 Aug 2014
Total Posts: 381
01 Apr 2017 02:14 PM
this happened to me when i made a fps, just subtract the id by one and should work. If not, than i cant help you.
Report Abuse
isaac036 is not online. isaac036
Joined: 02 Jan 2013
Total Posts: 2736
01 Apr 2017 02:25 PM
Yeah I did that but it still doesn't work
Report Abuse
isaac036 is not online. isaac036
Joined: 02 Jan 2013
Total Posts: 2736
01 Apr 2017 04:46 PM
Bump
Report Abuse
isaac036 is not online. isaac036
Joined: 02 Jan 2013
Total Posts: 2736
02 Apr 2017 04:00 PM
When a player is teamed on to "Bright blue" their shirt and pants should automatically change :/
Report Abuse
joji1000 is not online. joji1000
Joined: 23 Aug 2013
Total Posts: 291
02 Apr 2017 04:10 PM
uni.Shirt = ##################################### ID here)" uni.Pants = ##################################### ID here)"
Report Abuse
joji1000 is not online. joji1000
Joined: 23 Aug 2013
Total Posts: 291
02 Apr 2017 04:12 PM
damn it roblox .-. make sure this is in the uni.shirt or uni.pants text #### :/ / ### .roblox. com/ asset/? id= <--the number (removee the spaces)
Report Abuse
joji1000 is not online. joji1000
Joined: 23 Aug 2013
Total Posts: 291
02 Apr 2017 04:12 PM
o wait, judging by the length of the original uncensored id, you already did that, nvm
Report Abuse
joji1000 is not online. joji1000
Joined: 23 Aug 2013
Total Posts: 291
02 Apr 2017 04:13 PM
original censored*
Report Abuse
isaac036 is not online. isaac036
Joined: 02 Jan 2013
Total Posts: 2736
03 Apr 2017 06:39 AM
Ye
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
03 Apr 2017 06:48 AM
while wait() do
if plyr.TeamColor == BrickColor.new("Bright blue") then
shirt = plyr.Character:findFirstChild("Shirt")
pants = plyr.Character:findFirstChild("Pants")
shirt.ShirtTemplate = uni.Shirt
pants.PantsTemplate = uni.Pants
else return
end
end

I'm guessing, that findFirstChild("Shirt") (or Pants) may be returning nil.
When it returns nil, your script is going to break, so check for nil?

while wait() do
if plyr.TeamColor == BrickColor.new("Bright blue") then
shirt = plyr.Character:findFirstChild("Shirt")
pants = plyr.Character:findFirstChild("Pants")
if shirt ~= nil then
shirt.ShirtTemplate = uni.Shirt
end
if pants ~= nil then
pants.PantsTemplate = uni.Pants
end
else return
end
end
Report Abuse
QuantumNexsus is not online. QuantumNexsus
Joined: 09 Nov 2014
Total Posts: 2451
03 Apr 2017 07:21 AM
Lol what was with the random array lol.


#code print(string.rep("Lit",5))
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