Hi. So i made a random gun selector. It works, but when i added hum:EquipTool() it doesnt equip the tool, nor give me the gun. This MIGHT be because i disabled the backpack gui but it was only the gui, so i dont think so. Anyone know why?
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local hum = character:WaitForChild("Humanoid") local items = {script.AK47, script.G18, script.TrenchShotgun} local ChosenWeapon = items[math.random(1,#items)] local WeaponClone = ChosenWeapon:Clone() local hum = character:WaitForChild("Humanoid") hum:EquipTool(WeaponClone) end) end)
Server Script in server script service.