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: How to remove shirts,pants,and hats upon respawn

Previous Thread :: Next Thread 
NFSBoyLOL is not online. NFSBoyLOL
Joined: 17 Jun 2016
Total Posts: 3
01 Jul 2016 12:46 PM
This is a follow up from my last question, but in the opposite way


Now that I've got a standard outfit for my shooter game, there's one problem:the current outfit of the player overlaps the outfit that I set for the game. Is there a way where I can remove the player's shirts, pants, and hats upon spawn? T-Shirts also included

I am very new to scripting, but some guidance would be appreciated so I can continue working on my game and expand my knowledge of scripting.

-NFSBoyLOL


Report Abuse
kangerujack is not online. kangerujack
Joined: 08 Nov 2009
Total Posts: 690
01 Jul 2016 12:50 PM
In the same script that adds your uniform add this:

player:findFirstChild("Shirt"):Destroy()
player:findFirstChild("Pants"):Destroy()
Report Abuse
NFSBoyLOL is not online. NFSBoyLOL
Joined: 17 Jun 2016
Total Posts: 3
01 Jul 2016 01:17 PM
Thanks for the help (and a fast reply!), but there's a problem. It seems to be locating and removing the "Shirt" and "Pants" parts of the player, but the error is that the code you gave me is indexing those parts as a "nil value". It's as if the Shirt and Pants parts of the character is non-existent. This is where my problem is: I can't seem to find a way to let the script know I'm referring to the shirts and pants of the character, but everything I try just seems to not detect the Shirt and Pants.

If I'm doing something wrong, please tell me what it is.

-NFSBoyLOL


Report Abuse
ZeonMaxwelll is not online. ZeonMaxwelll
Joined: 02 Feb 2016
Total Posts: 16
01 Jul 2016 01:27 PM
I believe that if you use CharacterAdded into the player the character function runs when they respawn so you might want to try that


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