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: Deleting Clothes

Previous Thread :: Next Thread 
DoctorHelix is not online. DoctorHelix
Joined: 05 May 2015
Total Posts: 303
17 Jun 2015 08:14 PM
I tried deleting the clothes that a player is wearing. I made this script, but it didn't work. Why?

for i,v in pairs(Character:GetChildren()) do
if v:IsA("Shirt" and "Pants") then
v:Destroy()
end
end
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
17 Jun 2015 08:19 PM
for _,v in next, Character:GetChildren() do
if v:IsA("Shirt") or v:IsA("Pants") then
v:Destroy()
end
end
Report Abuse
DoctorHelix is not online. DoctorHelix
Joined: 05 May 2015
Total Posts: 303
17 Jun 2015 08:22 PM
That didn't work either.
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
17 Jun 2015 08:23 PM
have you defined Character
Report Abuse
Hyphonated is not online. Hyphonated
Joined: 22 Feb 2012
Total Posts: 175
17 Jun 2015 08:24 PM
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:wait()
local char = plr.Character
for i,v in pairs(char:GetChildren()) do
if v:IsA("Shirt") or v:IsA("Pants") then
v:Destroy()
end
end
end)

hi, I exist
Report Abuse
DoctorHelix is not online. DoctorHelix
Joined: 05 May 2015
Total Posts: 303
17 Jun 2015 08:24 PM
Mhm, of course.
Report Abuse
DoctorHelix is not online. DoctorHelix
Joined: 05 May 2015
Total Posts: 303
17 Jun 2015 08:28 PM
Hypo, that didn't work either.
Report Abuse
DoctorHelix is not online. DoctorHelix
Joined: 05 May 2015
Total Posts: 303
17 Jun 2015 08:52 PM
Bump
Report Abuse
vacha is not online. vacha
Joined: 06 Jan 2011
Total Posts: 1993
17 Jun 2015 09:46 PM
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
for i,v in pairs(char:GetChildren()) do
if v:IsA("Shirt") or v:IsA("Pants") then
v:Destroy()
end
end
end)
end)

there
while true do the do
Report Abuse
DoctorHelix is not online. DoctorHelix
Joined: 05 May 2015
Total Posts: 303
22 Jun 2015 06:32 PM
Why does it work if we put a while true do around it?
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