Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Roblox Equip Weapon Help Clones into backpack but glitches out player when selected?

I'm using a GUI to control the player and the weapons they choose.(Filtering Enabled is on)

Places the weapon in the user's backpack.

game.Lighting["1"]:clone().Parent = Player.Backpack
currentWeapons[slot] = Player.Backpack["1"]
-- Code to equip the weapon
Player.Character.Humanoid:EquipTool(etool)
--etool = currentWeapons[1] in this case

The problem is when I go to equip it, it's not equipping to the player but in the same spot in a game, and causes the player's arm and body to rotate at weird

Thanks for your help much appreciated

2 comments

0

Are you sure it's not the weapon itself that's causing the problem? Also try adding a wait() between lines 2 and 4.

1 answer

The weapon it self is anchored. Unanchor it, that should fix the problem.

5 comments

0

Also Turn cancollide off

0

I did that, the animation is played but the weapon disappears.

0

^ Does your weapon have a handle?

0

yes

0

When I added a weapon to the starter pack it seemed to fix it for some unknown reason

This discussion is preserved as it was. New answers, comments, and votes are closed.