|
player.Backpack:FindFirstChild("PaintBallGun"):remove()
output says there is a nil value but i check the entire script 3 times and there is no nil value |
|
sncplay42Join Date: 2008-11-27 Post Count: 11891 |
FindFirstChild is returning nil, because the tool you're looking for isn't in the backpack, probably because its child is the player when it's equipped. |
|
sncplay42Join Date: 2008-11-27 Post Count: 11891 |
Sorry, I mean its parent is the player's character. |
|
|
ok, how does a script tell if a a tool is equiped or not? |
|
VullmerJoin Date: 2011-03-14 Post Count: 93 |
Whats the entire script, and did you use an If statement? |
|
akiakeJoin Date: 2008-12-20 Post Count: 732 |
@Vullmer
*conditional statement
That's all we need, anyways. |
|
UFAIL2Join Date: 2010-08-14 Post Count: 6905 |
@unknown
Player = game.Player.LocalPlayer
if Player.Backpack.PaintBallGun.Enabled == false then -- means not equipped
if Player.Backpack.PaintBallGun.Enabled == true then -- means equipped |
|
MattKZJoin Date: 2009-11-14 Post Count: 6332 |
Wow, are alot of kinds of scripts. |
|
|
UFAIL2 I'm just asking but wouldn't you need a local script for that? |
|
UFAIL2Join Date: 2010-08-14 Post Count: 6905 |
No |
|
|
Oh ok sorry if I disturbed you |
|