Yes, I know this has been asked countless times but I’ve yet to see a completely straightforward answer.
This is my custom Hotbar gui, every player spawns in with 4 weapons, hence 4 slots. I’ve heard something about assigning each slot a number then when a player clicks that number it’ll fire a remote event that equips it. Well this raises some problems for my combat system, let me explain.
All 4 weapons are in the player’s Hotbar. When they click equip a weapon it’ll weld it to their body and fire a remote Event to bind an unsheath action. When this unsheath action is fired it does multiple things. First it plays an unsheath animation and then when it hits a certain key frame in the animation it’ll destroy the body weld for the weapon and weld it to their hand. Then it unbinds the unsheath action, binds the sheath action, binds all the combat actions (attack, block, dash), unbinds sprinting, and also disables the Hotbar. Then when a player presses sheath it fires the sheath action, which essentially reverses everything. While the player’s weapon is unsheathed I want it to disable the Hotbar, then when it’s sheathed it’s reenabled.
I have a few problems I need help solving
- How do I allow for mobile compatibility?
- How to make an unequipping system? (When a player unequips a weapon I want it unbind the unsheath button and destroy the weapon on their back and the weld.)
- How to disable the Hotbar when a player unsheathes a weapon then reenable it when they sheath it?