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
 

Delete shirt not workin

Previous Thread :: Next Thread 
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
16 Jun 2014 11:54 PM
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c.ChildAdded:connect(function(child)
if child:IsA("Shirt") then
child:Destroy()
end
end)
end)
end)
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
16 Jun 2014 11:59 PM
help
Report Abuse
wetrel is not online. wetrel
Joined: 19 Jun 2009
Total Posts: 919
17 Jun 2014 12:01 AM
Is there an error in the output? Does it try to remove the shirt before it is loaded (fix is adding wait)? Is shirt the class name?
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
17 Jun 2014 12:05 AM
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c.ChildAdded:connect(function(child)
if child.Name == "Shirt" then
child:Destroy()
repeat child:Destroy() until child==nil
end
end)
end)
end)
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
17 Jun 2014 12:10 AM
^That code crashed my cmputer..
Report Abuse
wetrel is not online. wetrel
Joined: 19 Jun 2009
Total Posts: 919
17 Jun 2014 12:12 AM
If it gets the player and then it checks for the shirt when something is added, I dont think it will work.

game.Players.PlayerAdded:connect(function(p)
repeat wait() until p.Character
local children = p.Character:GetChildren()
for i = 1, #children do
if children[i]:IsA("Shirt") then
children[i]:Remove()
end
end)
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