|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|