Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trying to make a script to remove everything in backpack, but something wrong?

Asked by
CjayPlyz 643 Moderation Voter
6 years ago

hello i have script which when you click, it removes everything in your backpack, then puts a new gun, but the problem is, if your holding the pistol it does"t remove the pistol then adds the new gun?

0
if u need the script please tell CjayPlyz 643 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Hi Cjay,

The reason for why it doesn't remove an equipped gun is simple. It doesn't remove an equipped gun because once a tool is equipped, it becomes parented to the character. So, what you want to do is check the character for tools as well, and remove them. Then, all the tools should be removed. I won't give you the script but, if you're a scripter that can remove things from the backpack, you can most likely remove things from the character.

I hope I helped and have a nice day/night.

Thanks,

Best regards,

~~ KingLoneCat

0
thanks ill test it right away, by the way, by character u mean the character of the player? CjayPlyz 643 — 6y
0
Yes, the character is the character of the player. It's found in the workspace with the same name as the player and is what you can see in the game. KingLoneCat 2642 — 5y
Ad

Answer this question