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
 

Why isnt this script working?

Previous Thread :: Next Thread 
vastqud is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
11 Aug 2015 02:08 PM

function onjoin(plr)
plr.CharacterAdded:connect(function(char)
wait(1)

char = plr.Character
local player = game.Players.LocalPlayer

if player.TeamColor == BrickColor.new("Medium Green") then
local shirt = char:findFirstChild("Shirt")
if shirt then
shirt:Destroy()
end
local pants = char:findFirstChild("Pants")
if pants then
pants:Destroy()
end
local pants2 = Instance.new("Pants",char)
pants2.PantsTemplate = "http://www.roblox.com/Rothco-Sea-Tiger-Operator-item?id=232155329"

local shirt2 = Instance.new("Shirt",char)
shirt2.ShirtTemplate = "http://www.roblox.com/Rothco-Sea-Tiger-Operator-item?id=232154164"

end
end)
end

game.Players.PlayerAdded:connect(onjoin)

I already tried using rbxassetid://
it still doesn't work
when I remove the if statement that checks the team, it works fine, but it gives clothes to everyone regardless of the team
and yes I subtracted 1 from the id of the clothes
and yes it is in a local script
please help me
Report Abuse
Dman2436 is not online. Dman2436
Joined: 26 May 2012
Total Posts: 1039
11 Aug 2015 02:11 PM
pants:
http://www.roblox.com/asset/?id=232155328
shirt:
http://www.roblox.com/asset/?id=232154164
you didnt have the right pants id btw
its not always 1 behind
Report Abuse
vastqud is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
11 Aug 2015 02:15 PM
I see
Report Abuse
vastqud is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
11 Aug 2015 02:17 PM
it still doesn't work :/
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