Download

problem with own weapon system

Hello, guys.
I`m making a weapon system, and now I have some problems.

  1. Now I have 3 different weapons(guns). When I take first weapon it dissapear from scene (and its right, its ok), but it don`t appear immediately in my hand socket. It appear only when I switch between weapons by mouse or press key 1. How to make weapon to appear immediately.
    Some image and comments on problem1:

    When player overlap weapon trigger, the weapon attached to socket.
    Function “Is holding weapon” simply turn bool “isHoldingWeapon” to true.

    Then we add weapon array to an array.

    Function “Equipped weapon” is simply play attached sound.

Can anybody help me, please.